Skip to content
Commit 3c3dd1e0 authored by Pan Bian's avatar Pan Bian Committed by Johan Hovold
Browse files

USB: serial: kl5kusb105: abort on open exception path



Function klsi_105_open() calls usb_control_msg() (to "enable read") and
checks its return value. When the return value is unexpected, it only
assigns the error code to the return variable retval, but does not
terminate the exception path. This patch fixes the bug by inserting
"goto err_generic_close;" when the call to usb_control_msg() fails.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
[johan: rebase on prerequisite fix and amend commit message]
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 6774d5f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment