summaryrefslogtreecommitdiff
path: root/drivers/usb/usbip
diff options
context:
space:
mode:
authorShuah Khan <shuah@kernel.org>2019-01-25 19:05:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-30 11:22:35 +0300
commita2fd23b93733bf604870eb8a15ccaa74c9b23889 (patch)
tree090b841170cee642f90eda8f43a9d0fd894e4501 /drivers/usb/usbip
parentf91649c525880006c78e62f6bae4d802a590c3ba (diff)
downloadlinux-a2fd23b93733bf604870eb8a15ccaa74c9b23889.tar.xz
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>
Diffstat (limited to 'drivers/usb/usbip')
-rw-r--r--drivers/usb/usbip/vudc_dev.c3
1 files changed, 2 insertions, 1 deletions
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);