diff options
author | Jiri Kosina <jkosina@suse.cz> | 2023-10-04 22:10:41 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-10-05 13:50:35 +0300 |
commit | b328dd02e19cb9d3b35de4322f5363516a20ac8c (patch) | |
tree | 13ceb79f5e1c8e3f70bc23ccc2210580af61409a /drivers/hid/hid-sony.c | |
parent | 95ea4d9fd385fe335b989f22d409df079a042b7a (diff) | |
download | linux-b328dd02e19cb9d3b35de4322f5363516a20ac8c.tar.xz |
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: kernel test robot <lkp@intel.com>
Fixes: e1cd4004cde7c9 ("HID: sony: Fix a potential memory leak in sony_probe()")
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sony.c')
-rw-r--r-- | drivers/hid/hid-sony.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index a02046a78b2d..ebc0aa4e4345 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -2155,8 +2155,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) return ret; err: - if (sc->ghl_urb) - usb_free_urb(sc->ghl_urb); + usb_free_urb(sc->ghl_urb); hid_hw_stop(hdev); return ret; |