[ Upstream commit
b328dd02e19cb9d3b35de4322f5363516a20ac8c ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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;