summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-10-22 18:10:24 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2010-11-10 14:29:09 +0100
commit20fffee818ec43b64f58ab25c42705b7dcae16e5 (patch)
tree3da1a6950c7ca7b55e36ce2d553f3c73904a623a
parentpd6729: Coding Style fixes (diff)
downloadlinux-20fffee818ec43b64f58ab25c42705b7dcae16e5.tar.xz
linux-20fffee818ec43b64f58ab25c42705b7dcae16e5.zip
pcmcia/cm4000: fix error code
I'm assuming it's not intended to instantly change the error code from -ENODEV to -EIO, is it? Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Acked-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index d962f25dcc2a..777181a2e603 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -979,8 +979,9 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
if (dev->flags0 & 1) {
set_bit(IS_CMM_ABSENT, &dev->flags);
rc = -ENODEV;
+ } else {
+ rc = -EIO;
}
- rc = -EIO;
goto release_io;
}