linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 45/49] pcmcia: handle error in serial_cs config calls
       [not found] <20100227103934.GA4430@comet.dominikbrodowski.net>
@ 2010-02-27 10:42 ` Dominik Brodowski
  0 siblings, 0 replies; only message in thread
From: Dominik Brodowski @ 2010-02-27 10:42 UTC (permalink / raw)
  To: linux-pcmcia; +Cc: Dominik Brodowski, linux-serial

Do not ignore the error returned by simple_config() / multi_config().

CC: linux-serial@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
 drivers/serial/serial_cs.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 0ee7239..8d38eab 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -695,11 +695,11 @@ static int serial_config(struct pcmcia_device * link)
 		info->multi = info->quirk->multi;
 
 	if (info->multi > 1)
-		multi_config(link);
+		i = multi_config(link);
 	else
-		simple_config(link);
+		i = simple_config(link);
 
-	if (info->ndev == 0)
+	if (i || info->ndev == 0)
 		goto failed;
 
 	/*
@@ -714,6 +714,7 @@ static int serial_config(struct pcmcia_device * link)
 	return 0;
 
 failed:
+	dev_warn(&link->dev, "serial_cs: failed to initialize\n");
 	serial_remove(link);
 	return -ENODEV;
 }
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-27 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100227103934.GA4430@comet.dominikbrodowski.net>
2010-02-27 10:42 ` [PATCH 45/49] pcmcia: handle error in serial_cs config calls Dominik Brodowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).