Message ID | 524ae90a-a7cb-feee-6107-743c52c2b1e4@web.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ARM: pxa: ssp: Delete an error message in pxa_ssp_probe() | expand |
On Sat, Apr 4, 2020 at 5:03 PM Markus Elfring <Markus.Elfring@web.de> wrote: > > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Sat, 4 Apr 2020 15:50:10 +0200 > Subject: [PATCH] ARM: pxa: ssp: Delete an error message in pxa_ssp_probe() > > The function “platform_get_irq” can log an error already. > Thus omit a redundant message for the exception handling in the > calling function. ... > ssp->irq = platform_get_irq(pdev, 0); > - if (ssp->irq < 0) { > - dev_err(dev, "no IRQ resource defined\n"); > + if (ssp->irq < 0) > return -ENODEV; > - } At the same time we can unshadow the error code, i.e. return ssp->irq;
>> ssp->irq = platform_get_irq(pdev, 0); >> - if (ssp->irq < 0) { >> - dev_err(dev, "no IRQ resource defined\n"); >> + if (ssp->irq < 0) >> return -ENODEV; >> - } > > At the same time we can unshadow the error code, i.e. > return ssp->irq; Have you got any preferences for the order of possible change combinations? Regards, Markus
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index 563440315acd..9e77b3392c1e 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -146,10 +146,8 @@ static int pxa_ssp_probe(struct platform_device *pdev) } ssp->irq = platform_get_irq(pdev, 0); - if (ssp->irq < 0) { - dev_err(dev, "no IRQ resource defined\n"); + if (ssp->irq < 0) return -ENODEV; - } if (dev->of_node) { const struct of_device_id *id =