From 0ca6a4754f9d122e57a3877a18df2dcf4dfe7de3 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Wed, 6 Mar 2019 18:31:39 +0900 Subject: [PATCH] usb: dwc_otg: check value of uWord type after convert uWord type is array, so checking variable with the type is not proper. Check value after convert. Change-Id: I5eca569feb949037bda212346c481fde82525d3d Signed-off-by: Seung-Woo Kim --- drivers/usb/host/dwc_otg/dwc_otg_pcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c index 9dabbe5..2ffd4f1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c @@ -1487,7 +1487,7 @@ int dwc_otg_pcd_ep_enable(dwc_otg_pcd_t * pcd, num = UE_GET_ADDR(desc->bEndpointAddress); dir = UE_GET_DIR(desc->bEndpointAddress); - if (!desc->wMaxPacketSize) { + if (!UGETW(desc->wMaxPacketSize)) { DWC_WARN("bad maxpacketsize\n"); retval = -DWC_E_INVALID; goto out; -- 2.7.4