summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdnsp-mem.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-12-05 09:34:57 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-12-05 09:34:57 -0800
commit944207047ca4dabe8e288f653e7ec6da05e70230 (patch)
tree8355b0c909bb81e6e3e0b8a016fceec43529e555 /drivers/usb/cdns3/cdnsp-mem.c
parent5163953950ab63ce296398b013d9d16bf2b40940 (diff)
parent37307f7020ab38dde0892a578249bf63d00bca64 (diff)
Merge tag 'usb-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are some small USB fixes for a few reported issues. Included in here are: - xhci fix for a _much_ reported regression. I don't think there's a community distro that has not reported this problem yet :( - new USB quirk addition - cdns3 minor fixes - typec regression fix. All of these have been in linux-next with no reported problems, and the xhci fix has been reported by many to resolve their reported problem" * tag 'usb-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdnsp: Fix a NULL pointer dereference in cdnsp_endpoint_init() usb: cdns3: gadget: fix new urb never complete if ep cancel previous requests usb: typec: tcpm: Wait in SNK_DEBOUNCED until disconnect USB: NO_LPM quirk Lenovo Powered USB-C Travel Hub xhci: Fix commad ring abort, write all 64 bits to CRCR register.
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-mem.c')
-rw-r--r--drivers/usb/cdns3/cdnsp-mem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
index ad9aee3f1e398..97866bfb2da9d 100644
--- a/drivers/usb/cdns3/cdnsp-mem.c
+++ b/drivers/usb/cdns3/cdnsp-mem.c
@@ -987,6 +987,9 @@ int cdnsp_endpoint_init(struct cdnsp_device *pdev,
/* Set up the endpoint ring. */
pep->ring = cdnsp_ring_alloc(pdev, 2, ring_type, max_packet, mem_flags);
+ if (!pep->ring)
+ return -ENOMEM;
+
pep->skip = false;
/* Fill the endpoint context */