Skip to contentSkip to conversation

pcmcia: handle error in serial_cs config calls

PATCH New Dominik Brodowski 1 participant 1 message Feb 17, 2010 1 message not in the archive TTY layer and serial drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 2/6 pcmcia: handle error in serial_cs config calls

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

---
 drivers/serial/serial_cs.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/serial/serial_cs.c +4 -3
index 0ee7239..8d38eab 100644
@@ -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;
 }
Signature · 1 line
1.6.3.3