Skip to content

Commit 3b8b4b9

Browse files
Denis ArefevJoshua-Dickens
authored andcommitted
backport: 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]> [[email protected]: Backported into input-wacom repository (b7c15ec)] Signed-off-by: Joshua Dickens <[email protected]>
1 parent dc4a726 commit 3b8b4b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

3.17/wacom_sys.c

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

2317-
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
2317+
if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) {
23182318
error = hid_hw_open(hdev);
2319+
if (error) {
2320+
hid_err(hdev, "hw open failed\n");
2321+
goto fail_quirks;
2322+
}
2323+
}
23192324

23202325
wacom_set_shared_values(wacom_wac);
23212326
devres_close_group(&hdev->dev, wacom);

0 commit comments

Comments
 (0)