Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7376ca3d authored by Zhouyang Jia's avatar Zhouyang Jia Committed by Greg Kroah-Hartman
Browse files

drivers/tty: add error handling for pcmcia_loop_config



[ Upstream commit 85c634e919bd6ef17427f26a52920aeba12e16ee ]

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>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 59c5b0c0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -629,8 +629,10 @@ static int serial_config(struct pcmcia_device * link)
	    (link->has_func_id) &&
	    (link->socket->pcmcia_pfc == 0) &&
	    ((link->func_id == CISTPL_FUNCID_MULTI) ||
	     (link->func_id == CISTPL_FUNCID_SERIAL)))
		pcmcia_loop_config(link, serial_check_for_multi, info);
	     (link->func_id == CISTPL_FUNCID_SERIAL))) {
		if (pcmcia_loop_config(link, serial_check_for_multi, info))
			goto failed;
	}

	/*
	 * Apply any multi-port quirk.