Commit 85c634e9 authored by Zhouyang Jia's avatar Zhouyang Jia Committed by Greg Kroah-Hartman

drivers/tty: add error handling for pcmcia_loop_config

When pcmcia_loop_config fails, the lack of error-handling code may
cause unexpected results.

This patch adds error-handling code after calling pcmcia_loop_config.
Signed-off-by: default avatarZhouyang Jia <jiazhouyang09@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be708744
...@@ -638,8 +638,10 @@ static int serial_config(struct pcmcia_device *link) ...@@ -638,8 +638,10 @@ static int serial_config(struct pcmcia_device *link)
(link->has_func_id) && (link->has_func_id) &&
(link->socket->pcmcia_pfc == 0) && (link->socket->pcmcia_pfc == 0) &&
((link->func_id == CISTPL_FUNCID_MULTI) || ((link->func_id == CISTPL_FUNCID_MULTI) ||
(link->func_id == CISTPL_FUNCID_SERIAL))) (link->func_id == CISTPL_FUNCID_SERIAL))) {
pcmcia_loop_config(link, serial_check_for_multi, info); if (pcmcia_loop_config(link, serial_check_for_multi, info))
goto failed;
}
/* /*
* Apply any multi-port quirk. * Apply any multi-port quirk.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment