2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

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>
This commit is contained in:
Dominik Brodowski 2010-01-24 18:20:22 +01:00
parent 7ab2485548
commit a78621bb11

View File

@ -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;
}