From: Shuah Khan Date: Fri, 25 Jan 2019 16:05:42 +0000 (-0700) Subject: usbip: Fix vep_free_request() null pointer checks on input args X-Git-Tag: v5.4-rc1~1507^2~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2fd23b93733bf604870eb8a15ccaa74c9b23889;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c index 1634d8698e15..a72c17ff1c6a 100644 --- a/drivers/usb/usbip/vudc_dev.c +++ b/drivers/usb/usbip/vudc_dev.c @@ -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);