summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-20 09:21:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-20 09:21:19 -0700
commit27ee8963708185b96bc84a149eb5336a249a7497 (patch)
treea69f91f42522182b524fcb57f269da2cfcb3f52d /drivers/char
parentac8bf564307962a763a52b34e771205c58b76ec8 (diff)
parent07a71415d5f790385695784a9b0e554412ee95c3 (diff)
downloadblackbird-op-linux-27ee8963708185b96bc84a149eb5336a249a7497.tar.gz
blackbird-op-linux-27ee8963708185b96bc84a149eb5336a249a7497.zip
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: pcmcia: fix error handling in cm4000_cs.c drivers/pcmcia: Add missing local_irq_restore serial_cs: MD55x support (PCMCIA GPRS/EDGE modem) (kernel 2.6.33) pcmcia: avoid late calls to pccard_validate_cis pcmcia: fix ioport size calculation in rsrc_nonstatic pcmcia: re-start on MFC override pcmcia: fix io_probe due to parent (PCI) resources pcmcia: use previously assigned IRQ for all card functions
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index c9bc896d68af..90b199f97bec 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1026,14 +1026,16 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
xoutb(0, REG_FLAGS1(iobase)); /* clear detectCMM */
/* last check before exit */
- if (!io_detect_cm4000(iobase, dev))
- count = -ENODEV;
+ if (!io_detect_cm4000(iobase, dev)) {
+ rc = -ENODEV;
+ goto release_io;
+ }
if (test_bit(IS_INVREV, &dev->flags) && count > 0)
str_invert_revert(dev->rbuf, count);
if (copy_to_user(buf, dev->rbuf, count))
- return -EFAULT;
+ rc = -EFAULT;
release_io:
clear_bit(LOCK_IO, &dev->flags);
OpenPOWER on IntegriCloud