usb: fotg210-udc: fix error return code in fotg210_udc_probe()
[linux-block.git] / drivers / usb / fotg210 / fotg210-udc.c
index 66e1b7ee3346eda9e75baf6759c137717bc0dc21..87cca81bf4ac970fcdb902e5add8c0a68eacb0e4 100644 (file)
@@ -1201,6 +1201,8 @@ int fotg210_udc_probe(struct platform_device *pdev)
                dev_info(dev, "found and initialized PHY\n");
        }
 
+       ret = -ENOMEM;
+
        for (i = 0; i < FOTG210_MAX_NUM_EP; i++) {
                fotg210->ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
                if (!fotg210->ep[i])