Subject: [PATCH 1/2] pcmcia: properly bail out on MTD-related ioctl invocation
From: Dominik Brodowski <[email-masked]>
To: [email-masked], [email-masked]
Date: Sat, 19 Mar 2005 12:28:47 +0100

Properly set the return value for DS_BIND_MTD, DS_GET_FIRST_REGION and
DS_GET_NEXT_REGION. Else trying to bind MTD devices the old (deprecated)
way may cause an endless loop in cardmgr. This also happens if the
resources weren't made available properly in /etc/pcmcia/config.opts.

Signed-off-by: Dominik Brodowski <[email-masked]>
---

 drivers/pcmcia/ds.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.12-rc1/drivers/pcmcia/ds.c
===================================================================
--- 2.6.12-rc1.orig/drivers/pcmcia/ds.c	2005-03-19 10:15:23.000000000 +0100
+++ 2.6.12-rc1/drivers/pcmcia/ds.c	2005-03-19 10:18:33.000000000 +0100
@@ -1453,7 +1453,7 @@
 			printed++;
 		}
 	}
-	ret = -EINVAL;
+	err = -EINVAL;
 	goto free_out;
 	break;
     case DS_GET_FIRST_WINDOW: