summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index d027c80ab359..206cfabc9286 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -583,6 +583,10 @@ static int usbhsg_recip_run_handle(struct usbhs_priv *priv,
char *msg;
uep = usbhsg_gpriv_to_nth_uep(gpriv, nth);
+ if (!usbhsg_uep_to_pipe(uep)) {
+ dev_err(dev, "wrong recip request\n");
+ return -EINVAL;
+ }
switch (recip) {
case USB_RECIP_DEVICE:
OpenPOWER on IntegriCloud