Browse Source

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>
Bojan Prtvar 14 years ago
parent
commit
6371fe54b5
1 changed files with 1 additions and 3 deletions
  1. 1 3
      drivers/hid/hid-zydacron.c

+ 1 - 3
drivers/hid/hid-zydacron.c

@@ -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[] = {