usb: chipidea: imx: fix missing ret assignment for dev_err_probe
PATCH 1/1 usb: chipidea: imx: fix missing ret assignment for dev_err_probe
From: Xu Yang <[email protected]>
Assign the return value of dev_err_probe() to ret so that the correct error code is propagated when goto err_clk is taken.
--- drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/chipidea/ci_hdrc_imx.c +1 -1
@@ -528,7 +528,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)if (data->wakeup_irq >0 ) { irq_name =devm_kasprintf (dev,GFP_KERNEL ,"%s:wakeup" , pdata.name);if (!irq_name) { -dev_err_probe (dev, -ENOMEM ,"failed to create irq_name\n" ); + ret =dev_err_probe (dev, -ENOMEM ,"failed to create irq_name\n" ); goto err_clk; }
Signature · 1 line
2.34.1
Quoted 19 lines · Xu Yang
From: Xu Yang <[email protected]>
Assign the return value of
dev_err_probe()to ret so that the correct error code is propagated when gotoerr_clkis taken.Fixes 2e9762f45efb ("usb: chipidea: ci_hdrc_imx: use "wakeup" suffix for wakeup interrupt name")Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by Xu Yang <[email protected]>--- drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/chipidea/ci_hdrc_imx.c +0
-0
drivers/usb/chipidea/ci_hdrc_imx.c static int ci_hdrc_imx_probe(struct platform_device *pdev) · line 531
Quoted 5 lines
drivers/usb/chipidea/ci_hdrc_imx.c +1
-1@@ -528,7 +528,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)if (data->wakeup_irq >0 ) { irq_name =devm_kasprintf (dev,GFP_KERNEL ,"%s:wakeup" , pdata.name);if (!irq_name) { -dev_err_probe (dev, -ENOMEM ,"failed to create irq_name\n" ); + ret =dev_err_probe (dev, -ENOMEM ,"failed to create irq_name\n" );
Generally, -ENOMEM needn't print message,
just ret = -ENOMEM;
Frank
Quoted 7 lines
drivers/usb/chipidea/ci_hdrc_imx.c +0
-1goto err_clk; } --2.34.1
Quoted 28 lines · Frank Li
Quoted 19 lines · Xu Yang
From: Xu Yang <[email protected]>
Assign the return value of
dev_err_probe()to ret so that the correct error code is propagated when gotoerr_clkis taken.Fixes 2e9762f45efb ("usb: chipidea: ci_hdrc_imx: use "wakeup" suffix for wakeup interrupt name")Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by Xu Yang <[email protected]>--- drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/chipidea/ci_hdrc_imx.c +0
-0drivers/usb/chipidea/ci_hdrc_imx.c static int ci_hdrc_imx_probe(struct platform_device *pdev) · line 531
Quoted 5 lines
drivers/usb/chipidea/ci_hdrc_imx.c +1
-1@@ -528,7 +528,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)if (data->wakeup_irq >0 ) { irq_name =devm_kasprintf (dev,GFP_KERNEL ,"%s:wakeup" , pdata.name);if (!irq_name) { -dev_err_probe (dev, -ENOMEM ,"failed to create irq_name\n" ); + ret =dev_err_probe (dev, -ENOMEM ,"failed to create irq_name\n" );Generally,
-ENOMEMneedn't print message,
Quoted 1 line
just ret = -ENOMEM;
OK. I see it has already been picked. I will pay attention next time.
Thanks,
Xu Yang