Skip to content

Commit 27ba1d5

Browse files
elfringJiri Kosina
authored andcommitted
HID: wacom: Delete an unnecessary check before kobject_put()
The kobject_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 6f1da31 commit 27ba1d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/hid/wacom_sys.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,8 +1353,7 @@ static void wacom_clean_inputs(struct wacom *wacom)
13531353
else
13541354
input_free_device(wacom->wacom_wac.pad_input);
13551355
}
1356-
if (wacom->remote_dir)
1357-
kobject_put(wacom->remote_dir);
1356+
kobject_put(wacom->remote_dir);
13581357
wacom->wacom_wac.pen_input = NULL;
13591358
wacom->wacom_wac.touch_input = NULL;
13601359
wacom->wacom_wac.pad_input = NULL;

0 commit comments

Comments
 (0)