renesas_usbhs can't handle scatter/gather type DMA. Thus, return -EINVAL is better than WARNING() on mod_gadget Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- drivers/usb/renesas_usbhs/mod_gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 28478ce..40256bf 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -180,7 +180,8 @@ static int usbhsg_dma_map_ctrl(struct usbhs_pkt *pkt, int map) if (map) { /* it can not use scatter/gather */ - WARN_ON(req->num_sgs); + if (req->num_sgs) + return -EINVAL; ret = usb_gadget_map_request(&gpriv->gadget, req, dir); if (ret < 0) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html