[PATCH 2/5] pcmcia/cm4000: fix error code

Dominik Brodowski linux at dominikbrodowski.net
Wed Nov 10 08:37:43 EST 2010


From: Nicolas Kaiser <nikai at nikai.net>

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 at nikai.net>
Acked-by: Harald Welte <laforge at gnumonks.org>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/char/pcmcia/cm4000_cs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index d962f25..777181a 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;
 	}
 
-- 
1.7.1




More information about the linux-pcmcia mailing list