Commit 6371fe54 authored by Bojan Prtvar's avatar Bojan Prtvar Committed by Jiri Kosina

HID: zydacron: kfree() NULL pointer cleanup

Checking for NULL pointers before kfree() is redundant.
Signed-off-by: default avatarBojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent f5fc8790
...@@ -201,9 +201,7 @@ static void zc_remove(struct hid_device *hdev) ...@@ -201,9 +201,7 @@ static void zc_remove(struct hid_device *hdev)
struct zc_device *zc = hid_get_drvdata(hdev); struct zc_device *zc = hid_get_drvdata(hdev);
hid_hw_stop(hdev); hid_hw_stop(hdev);
kfree(zc);
if (NULL != zc)
kfree(zc);
} }
static const struct hid_device_id zc_devices[] = { static const struct hid_device_id zc_devices[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment