mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-24 11:25:43 +00:00
HID: sony: remove duplicate NULL check before calling usb_free_urb()
[ Upstream commitb328dd02e1
] 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:e1cd4004cd
("HID: sony: Fix a potential memory leak in sony_probe()") Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
40d609b6ad
commit
07c6338acb
1 changed files with 1 additions and 2 deletions
|
@ -3074,8 +3074,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;
|
||||
|
|
Loading…
Reference in a new issue