usb: gadget: fsl: fix null pointer checking
fsl_ep_fifo_status() should return error if _ep->desc is null.
Fixes: 75eaa498c9
(“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>
This commit is contained in:
parent
0d66e04875
commit
48e7bbbbb2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue