linux-stable/drivers/staging
Ian Abbott aaeb61a97b staging: comedi: amplc_pc236: fix invalid register access during detach
`pc236_detach()` is called by the comedi core if it attempted to attach
a device and failed.  `pc236_detach()` calls `pc236_intr_disable()` if
the comedi device private data pointer (`devpriv`) is non-null.  This
test is insufficient as `pc236_intr_disable()` accesses hardware
registers and the attach routine may have failed before it has saved
their I/O base addresses.

Fix it by checking `dev->iobase` is non-zero before calling
`pc236_intr_disable()` as that means the I/O base addresses have been
saved and the hardware registers can be accessed.  It also implies the
comedi device private data pointer is valid, so there is no need to
check it.

Cc: <stable@vger.kernel.org> # 3.5.x, 3.6.x
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 11:46:35 -07:00
..
android mm: kill vma flag VM_CAN_NONLINEAR 2012-10-09 16:22:17 +09:00
asus_oled
bcm Staging: bcm: Remove typedef for _stCPacketClassificationRuleSI and call directly. 2012-09-26 09:31:52 -07:00
ccg Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
ced1401 staging:ced1401: remove read write callbacks from fops 2012-09-21 08:56:41 -07:00
comedi staging: comedi: amplc_pc236: fix invalid register access during detach 2012-10-22 11:46:35 -07:00
cptm1217
crystalhd
csr staging: Fix spelling of "asynchronous" in comments. 2012-09-21 08:56:41 -07:00
cxt1e1
dgrp userns: Fix build of drivers/staging/dgrp 2012-10-03 09:52:08 -07:00
echo
et131x Staging tree update for 3.7-rc1 2012-10-01 12:11:39 -07:00
frontier
ft1000 staging: ft1000: replace c99 comments with c88 2012-09-17 05:31:32 -07:00
gdm72xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
iio staging:iio:adis16400: Fixup adis16336 temp channel attributes 2012-10-19 16:23:34 +01:00
imx-drm staging: drm/imx: Add TODO 2012-09-21 09:17:07 -07:00
ipack TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
keucr USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
line6
media [media] v4l2: make vidioc_s_crop const 2012-09-26 11:02:25 -03:00
net
nvec Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
octeon
olpc_dcon
omap-thermal Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux into thermal 2012-10-09 01:35:52 -04:00
omapdrm fbdev updates for 3.7 2012-10-12 10:21:02 +09:00
ozwpan staging: ozwpan: compare pointer to NULL rather than 0 2012-09-19 09:28:14 +01:00
panel staging: Fix misspellings of "whether". 2012-09-21 08:56:40 -07:00
phison
quickstart
ramster
rtl8187se
rtl8192e Staging tree update for 3.7-rc1 2012-10-01 12:11:39 -07:00
rtl8192u staging: Fix misspellings of "whether". 2012-09-21 08:56:40 -07:00
rtl8712 staging: r8712u: Do not queue cloned skb 2012-09-26 13:05:50 -07:00
rts5139 staging: rts5139: use kzalloc() to close an info leak 2012-09-26 09:19:50 -07:00
rts_pstor staging/rts_pstor: Delete some lines (dev_info() and dev_err()) in rtsx.c 2012-09-21 08:56:41 -07:00
sbe-2t3e3 staging: sbe-2t3e3: fix error handling in t3e3_init_channel() 2012-09-25 15:48:25 -07:00
sep
serqt_usb2 USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
silicom staging: fix silicom dependencies and build errors 2012-09-21 08:56:40 -07:00
slicoss
sm7xxfb staging: sm7xxfb: remove smtc_VRAMBaseAddress 2012-09-17 14:57:53 -07:00
speakup TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
ste_rmi4 staging: ste_rmi4: remove gpio.h include 2012-09-14 09:21:56 -05:00
telephony staging: Fix spelling of "asynchronous" in comments. 2012-09-21 08:56:41 -07:00
tidspbridge mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
usbip USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
vme
vt6655
vt6656 Merge 3.6-rc6 into staging-next 2012-09-16 17:17:25 -07:00
winbond Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
wlags49_h2
wlags49_h25 staging: "wlags49_h25" Fix typos. 2012-09-17 14:50:33 -07:00
wlan-ng staging "wlan-ng" Fix typos. 2012-09-26 09:19:50 -07:00
xgifb staging: xgifb: delete bogus video RAM configuration 2012-09-13 20:41:57 -07:00
zcache Merge 3.6-rc6 into staging-next 2012-09-16 17:17:25 -07:00
zram
zsmalloc
Kconfig TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
Makefile TTY merge for 3.7-rc1 2012-10-01 12:26:52 -07:00
staging.c