linux/drivers/staging
Ian Abbott 5a30fddcc9 staging: comedi: amplc_pc236: fix invalid register access during detach
commit aaeb61a97b upstream.

`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.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-31 09:51:42 -07:00
..
altera-stapl Staging: altera: move .h file to proper place 2011-06-07 12:19:14 -07:00
asus_oled Staging: asus_oled: fix NULL-ptr crash on unloading 2012-02-13 11:06:12 -08:00
ath6kl net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared 2011-08-15 18:31:38 -07:00
bcm
brcm80211 brcm80211: smac: resume transmit fifo upon receiving frames 2012-05-07 08:56:34 -07:00
comedi staging: comedi: amplc_pc236: fix invalid register access during detach 2012-10-31 09:51:42 -07:00
cptm1217 drivers/staging/cptm1217/clearpad_tm1217.c: Correct call to input_free_device 2011-05-18 14:30:49 -07:00
crystalhd
cs5535_gpio
cx25821
cxd2099
cxt1e1
dt3155v4l
easycap staging/easycap: easycap_probe: drop more unused variables 2011-05-18 14:30:08 -07:00
echo staging: echo: Trivial indentation changes 2011-05-17 13:31:29 -07:00
et131x
frontier
ft1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2011-05-24 13:28:35 -07:00
generic_serial Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-05-26 13:19:00 -07:00
gma500 staging: gma500: get control from firmware framebuffer if conflicts 2011-06-07 12:28:42 -07:00
go7007
hv Staging: hv: Add support for >2 TB LUN in storage driver. 2011-11-11 09:35:14 -08:00
iio staging: iio: hmc5843: Fix crash in probe function. 2012-04-22 16:21:23 -07:00
intel_sst Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-05-23 12:49:28 -07:00
keucr staging/keucr: fix transport other code style 2011-05-18 08:22:41 -07:00
line6 drivers/staging/line6/driver.c: Drop unneeded put functions. 2011-05-17 13:31:32 -07:00
lirc media: lirc_sir: make device registration work 2012-10-02 09:47:42 -07:00
mei Staging: mei: fix suspend failure 2011-06-27 14:19:21 -07:00
msm
nvec Staging: initial version of the nvec driver 2011-05-19 15:36:10 -07:00
octeon
olpc_dcon staging: fix olpc_dcon build, needs BACKLIGHT_CLASS_DEVICE 2011-06-07 12:28:39 -07:00
panel
phison
pohmelfs sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
quatech_usb2 staging: quatech_usb2: Potential lost wakeup scenario in TIOCMIWAIT 2011-11-11 09:35:14 -08:00
quickstart
rtl8187se
rtl8192e staging: r8192e_pci: Handle duplicate PCI ID 0x10ec:0x8192 conflict with rtl8192se 2011-08-04 21:58:31 -07:00
rtl8192u staging: rtl8192u: declare MODULE_FIRMWARE 2011-08-17 10:55:50 -07:00
rtl8712 staging: r8712u: fix bug in r8712_recv_indicatepkt() 2012-10-02 09:47:24 -07:00
rts_pstor staging: rts_pstor: use bitwise operator instead of logical one 2011-06-07 12:28:40 -07:00
sbe-2t3e3
sep
serqt_usb2 staging: serqt_usb2: remove ssu100 from supported devices 2011-11-11 09:35:13 -08:00
slicoss
sm7xx Staging: sm7xx: printk loglevels modified to match the scenario 2011-05-19 15:34:32 -07:00
solo6x10
speakup staging: speakup_soft: Fix reading of init string 2012-10-07 08:27:24 -07:00
spectra
ste_rmi4
tidspbridge
tm6000 [media] tm6000: fix uninitialized field, change prink to dprintk 2011-05-21 07:24:19 -03:00
tty Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-05-23 12:49:28 -07:00
usbip staging: usbip: bugfix for deadlock 2011-12-09 08:52:39 -08:00
vme
vt6655
vt6656 staging: vt6656: [BUG] - Failed connection, incorrect endian. 2012-10-02 09:47:24 -07:00
westbridge
winbond USB: winbond: remove __devinit* from the struct usb_device_id table 2012-09-14 10:00:37 -07:00
wlags49_h2
wlags49_h25
wlan-ng Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-24 16:47:54 -04:00
xgifb
zcache vmscan: change shrinker API by passing shrink_control struct 2011-05-25 08:39:26 -07:00
zram
Kconfig Staging: remove STAGING_EXCLUDE_BUILD option 2011-06-07 12:23:57 -07:00
Makefile Staging: initial version of the nvec driver 2011-05-19 15:36:10 -07:00
staging.c