HID: zydacron: kfree() NULL pointer cleanup
authorBojan Prtvar <prtvar.b@gmail.com>
Thu, 4 Aug 2011 20:43:46 +0000 (22:43 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 4 Aug 2011 21:51:29 +0000 (23:51 +0200)
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>
drivers/hid/hid-zydacron.c

index e90371508fd2bf7a205cc56e31d47f1eda1a084e..1ad85f2257b4b46d4c48cd49f883fa95634c17e7 100644 (file)
@@ -201,9 +201,7 @@ static void zc_remove(struct hid_device *hdev)
        struct zc_device *zc = hid_get_drvdata(hdev);
 
        hid_hw_stop(hdev);
-
-       if (NULL != zc)
-               kfree(zc);
+       kfree(zc);
 }
 
 static const struct hid_device_id zc_devices[] = {