Skip to content

Commit 48e7bbb

Browse files
RanWang1felipebalbi
authored andcommitted
usb: gadget: fsl: fix null pointer checking
fsl_ep_fifo_status() should return error if _ep->desc is null. Fixes: 75eaa49 (“usb: gadget: Correct NULL pointer checking in fsl gadget”) Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Ran Wang <ran.wang_1@nxp.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
1 parent 0d66e04 commit 48e7bbb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/gadget/udc/fsl_udc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep)
10511051
u32 bitmask;
10521052
struct ep_queue_head *qh;
10531053

1054-
if (!_ep || _ep->desc || !(_ep->desc->bEndpointAddress&0xF))
1054+
if (!_ep || !_ep->desc || !(_ep->desc->bEndpointAddress&0xF))
10551055
return -ENODEV;
10561056

10571057
ep = container_of(_ep, struct fsl_ep, ep);

0 commit comments

Comments
 (0)