Skip to content
Snippets Groups Projects
Commit 48e7bbbb authored by Ran Wang's avatar Ran Wang Committed by Felipe Balbi
Browse files

usb: gadget: fsl: fix null pointer checking


fsl_ep_fifo_status() should return error if _ep->desc is null.

Fixes: 75eaa498 (“usb: gadget: Correct NULL pointer checking in fsl gadget”)
Reviewed-by: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarRan Wang <ran.wang_1@nxp.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 0d66e048
No related branches found
No related tags found
No related merge requests found
......@@ -1051,7 +1051,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep)
u32 bitmask;
struct ep_queue_head *qh;
if (!_ep || _ep->desc || !(_ep->desc->bEndpointAddress&0xF))
if (!_ep || !_ep->desc || !(_ep->desc->bEndpointAddress&0xF))
return -ENODEV;
ep = container_of(_ep, struct fsl_ep, ep);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment