提交 a78621bb 编写于 作者: D Dominik Brodowski

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: NDominik Brodowski <linux@dominikbrodowski.net>
上级 7ab24855
...@@ -695,11 +695,11 @@ static int serial_config(struct pcmcia_device * link) ...@@ -695,11 +695,11 @@ static int serial_config(struct pcmcia_device * link)
info->multi = info->quirk->multi; info->multi = info->quirk->multi;
if (info->multi > 1) if (info->multi > 1)
multi_config(link); i = multi_config(link);
else else
simple_config(link); i = simple_config(link);
if (info->ndev == 0) if (i || info->ndev == 0)
goto failed; goto failed;
/* /*
...@@ -714,6 +714,7 @@ static int serial_config(struct pcmcia_device * link) ...@@ -714,6 +714,7 @@ static int serial_config(struct pcmcia_device * link)
return 0; return 0;
failed: failed:
dev_warn(&link->dev, "serial_cs: failed to initialize\n");
serial_remove(link); serial_remove(link);
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册