Skip to content

Commit b7c15ec

Browse files
Denis ArefevJoshua-Dickens
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]> [[email protected]: Imported into input-wacom repository (16a9c24f24fb)] Signed-off-by: Joshua Dickens <[email protected]>
1 parent e0c3e13 commit b7c15ec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

4.5/wacom_sys.c

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

2477-
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
2477+
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) {
24782478
error = hid_hw_open(hdev);
2479+
if (error) {
2480+
hid_err(hdev, "hw open failed\n");
2481+
goto fail_quirks;
2482+
}
2483+
}
24792484

24802485
wacom_set_shared_values(wacom_wac);
24812486
devres_close_group(&hdev->dev, wacom);

0 commit comments

Comments
 (0)