[PATCH 10/23] pcmcia: switch cm4000_cs.c to unlocked_ioctl

Dominik Brodowski linux at dominikbrodowski.net
Tue Jul 15 14:56:45 EDT 2008


On Mon, Jul 14, 2008 at 12:09:34PM +0200, Peter Stuge wrote:
> On Mon, Jul 14, 2008 at 10:14:12AM +0200, Dominik Brodowski wrote:
> >  	if (test_bit(IS_CMM_ABSENT, &dev->flags)) {
> >  		DEBUGP(4, dev, "CMM_ABSENT flag set\n");
> > -		return -ENODEV;
> > +		goto out;
> >  	}
> > +	rc = EINVAL;
> 
> Shouldn't this be rc = -EINVAL; ?

Right, it should be.

From: Dominik Brodowski <linux at dominikbrodowski.net>
Date: Tue, 15 Jul 2008 20:11:21 +0200
Subject: [PATCH 1/3] pcmcia: fix return value in cm4000_cs.c

should be -EINVAL, not EINVAL. Found by Peter Stuge.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/char/pcmcia/cm4000_cs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 59ca351..e4a4fbd 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1439,7 +1439,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		DEBUGP(4, dev, "CMM_ABSENT flag set\n");
 		goto out;
 	}
-	rc = EINVAL;
+	rc = -EINVAL;
 
 	if (_IOC_TYPE(cmd) != CM_IOC_MAGIC) {
 		DEBUGP(4, dev, "ioctype mismatch\n");
-- 
1.5.4.3




More information about the linux-pcmcia mailing list