diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-11-06 18:00:30 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-11-19 16:52:31 +0100 |
commit | 27ba1d56e1e150294802f0dca8368abc51a664fb (patch) | |
tree | 06d77f495f243a08696a69a38a42eb2a9d2dcc90 /drivers/hid | |
parent | 6f1da317ac1df15f442b5fd37be7740c7cb55057 (diff) | |
download | blackbird-op-linux-27ba1d56e1e150294802f0dca8368abc51a664fb.tar.gz blackbird-op-linux-27ba1d56e1e150294802f0dca8368abc51a664fb.zip |
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 <elfring@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/wacom_sys.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index e06af5b9f59e..c7a3b79d563e 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -1353,8 +1353,7 @@ static void wacom_clean_inputs(struct wacom *wacom) else input_free_device(wacom->wacom_wac.pad_input); } - if (wacom->remote_dir) - kobject_put(wacom->remote_dir); + kobject_put(wacom->remote_dir); wacom->wacom_wac.pen_input = NULL; wacom->wacom_wac.touch_input = NULL; wacom->wacom_wac.pad_input = NULL; |