Return-Path: Received: from localhost (bix [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id j2JBTw7g001717 for ; Sat, 19 Mar 2005 03:29:59 -0800 Received: from bix [127.0.0.1] by localhost with POP3 (fetchmail-6.2.0) for akpm@localhost (single-drop); Sat, 19 Mar 2005 03:29:59 -0800 (PST) Received: from smtp.osdl.org (fire.osdl.org [65.172.181.4]) by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id j2JBT0U0012322 for ; Sat, 19 Mar 2005 03:29:00 -0800 Received: from linta.de (isilmar.linta.de [213.239.214.66]) by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id j2JBSrqi026748 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Sat, 19 Mar 2005 03:28:54 -0800 Received: (qmail 26400 invoked by uid 1000); 19 Mar 2005 11:28:47 -0000 Date: Sat, 19 Mar 2005 12:28:47 +0100 From: Dominik Brodowski To: akpm@osdl.org, linux-pcmcia@lists.infradead.org Subject: [PATCH 1/2] pcmcia: properly bail out on MTD-related ioctl invocation Message-ID: <20050319112847.GB26375@isilmar.linta.de> Mail-Followup-To: akpm@osdl.org, linux-pcmcia@lists.infradead.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i Received-SPF: none (domain of brodo@linta.de does not designate permitted sender hosts) X-MIMEDefang-Filter: osdl$Revision: 1.105 $ X-Scanned-By: MIMEDefang 2.36 X-Spam-Status: No, score=-1.6 required=2.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on bix 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 --- 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: