usbip: Fix vep_free_request() null pointer checks on input args

Fix vep_free_request() to return when usb_ep and usb_request are null
instead of calling WARN_ON.

Signed-off-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Shuah Khan 2019-01-25 09:05:42 -07:00 committed by Greg Kroah-Hartman
parent f91649c525
commit a2fd23b937

View File

@ -297,7 +297,8 @@ static void vep_free_request(struct usb_ep *_ep, struct usb_request *_req)
{
struct vrequest *req;
if (WARN_ON(!_ep || !_req))
/* ep is always valid here - see usb_ep_free_request() */
if (!_req)
return;
req = to_vrequest(_req);