This is a note to let you know that I've just added the patch titled usb: gadget: fsl: fix null pointer checking to the 5.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-gadget-fsl-fix-null-pointer-checking.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 90648ddb3f7f59eb7dcbc1330221759cc8782258 Author: Ran Wang <ran.wang_1@xxxxxxx> Date: Fri Oct 16 12:33:26 2020 +0800 usb: gadget: fsl: fix null pointer checking [ Upstream commit 48e7bbbbb261b007fe78aa14ae62df01d236497e ] fsl_ep_fifo_status() should return error if _ep->desc is null. Fixes: 75eaa498c99e (â??usb: gadget: Correct NULL pointer checking in fsl gadgetâ??) Reviewed-by: Peter Chen <peter.chen@xxxxxxx> Signed-off-by: Ran Wang <ran.wang_1@xxxxxxx> Signed-off-by: Felipe Balbi <balbi@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index a6f7b2594c090..c0cb007b749ff 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -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);