mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
HID: wacom: Add error check to wacom_parse_and_register()
[ Upstream commit 16a9c24f24fbe4564284eb575b18cc20586b9270 ] Added a variable check and transition in case of an error Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev <[email protected]> Reviewed-by: Ping Cheng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
2af8d96372
commit
99de9a18e6
1 changed files with 6 additions and 1 deletions
|
|
@ -2419,8 +2419,13 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
|
|||
goto fail_quirks;
|
||||
}
|
||||
|
||||
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
|
||||
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) {
|
||||
error = hid_hw_open(hdev);
|
||||
if (error) {
|
||||
hid_err(hdev, "hw open failed\n");
|
||||
goto fail_quirks;
|
||||
}
|
||||
}
|
||||
|
||||
wacom_set_shared_values(wacom_wac);
|
||||
devres_close_group(&hdev->dev, wacom);
|
||||
|
|
|
|||
Loading…
Reference in a new issue