Skip to content

Commit

Permalink
HID: zydacron: kfree() NULL pointer cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bojan Prtvar authored and Jiri Kosina committed Aug 4, 2011
1 parent f5fc879 commit 6371fe5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hid/hid-zydacron.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 6371fe5

Please sign in to comment.