HID: zydacron: kfree() NULL pointer cleanup
Checking for NULL pointers before kfree() is redundant. Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
committed by
Jiri Kosina
parent
f5fc87905e
commit
6371fe54b5
@@ -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[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user