projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95ea4d9
)
HID: sony: remove duplicate NULL check before calling usb_free_urb()
author
Jiri Kosina
<jkosina@suse.cz>
Wed, 4 Oct 2023 19:10:41 +0000
(21:10 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Thu, 5 Oct 2023 10:50:35 +0000
(12:50 +0200)
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>
drivers/hid/hid-sony.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-sony.c
b/drivers/hid/hid-sony.c
index a02046a78b2da09db627af572a9558d147b5bafe..ebc0aa4e4345febb0240eba81b0f7b2424264df2 100644
(file)
--- 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;