summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc2/pci.c')
-rw-r--r--drivers/usb/dwc2/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
index 7f21747007f1..bea2e8ec0369 100644
--- a/drivers/usb/dwc2/pci.c
+++ b/drivers/usb/dwc2/pci.c
@@ -141,8 +141,10 @@ static int dwc2_pci_probe(struct pci_dev *pci,
goto err;
glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
- if (!glue)
+ if (!glue) {
+ ret = -ENOMEM;
goto err;
+ }
ret = platform_device_add(dwc2);
if (ret) {