diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-24 17:20:22 (GMT) |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-02-17 17:00:18 (GMT) |
commit | a78621bb11fbad32a3ef968c65f9b93858b3341a (patch) | |
tree | c6b5d58f69185fb3562aeaac2664b00c1c128b20 /drivers/serial | |
parent | 7ab24855482fbc47712de46c05726d59cd0748e2 (diff) | |
download | linux-fsl-qoriq-a78621bb11fbad32a3ef968c65f9b93858b3341a.tar.xz |
pcmcia: handle error in serial_cs config calls
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>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | 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; } |