From: Wei Yongjun Date: Tue, 7 May 2013 11:47:44 +0000 (+0800) Subject: usb: musb: dsps: fix error return code in dsps_create_musb_pdev() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b25e5f1c4416cf96fac0918a8f1b0429642570a9;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git usb: musb: dsps: fix error return code in dsps_create_musb_pdev() Fix to return -ENOMEM in the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 3a18e44e9391..e1b661d04021 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -560,6 +560,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) if (!config) { dev_err(&pdev->dev, "failed to allocate musb hdrc config\n"); + ret = -ENOMEM; goto err2; }