Skip to content

Commit 16a9c24

Browse files
Denis ArefevJiri Kosina
authored andcommitted
HID: wacom: Add error check to wacom_parse_and_register()
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]>
1 parent ed84c45 commit 16a9c24

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/hid/wacom_sys.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,8 +2414,13 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
24142414
goto fail_quirks;
24152415
}
24162416

2417-
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
2417+
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) {
24182418
error = hid_hw_open(hdev);
2419+
if (error) {
2420+
hid_err(hdev, "hw open failed\n");
2421+
goto fail_quirks;
2422+
}
2423+
}
24192424

24202425
wacom_set_shared_values(wacom_wac);
24212426
devres_close_group(&hdev->dev, wacom);

0 commit comments

Comments
 (0)