Commit b328dd02 authored by Jiri Kosina's avatar Jiri Kosina

HID: sony: remove duplicate NULL check before calling usb_free_urb()

usb_free_urb() does the NULL check itself, so there is no need to duplicate
it prior to calling.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: e1cd4004 ("HID: sony: Fix a potential memory leak in sony_probe()")
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 95ea4d9f
...@@ -2155,7 +2155,6 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) ...@@ -2155,7 +2155,6 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
return ret; return ret;
err: err:
if (sc->ghl_urb)
usb_free_urb(sc->ghl_urb); usb_free_urb(sc->ghl_urb);
hid_hw_stop(hdev); hid_hw_stop(hdev);
......
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