* [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message
@ 2020-01-16 14:14 YueHaibing
[not found] ` <20200116141433.57056-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2020-01-16 14:14 UTC (permalink / raw)
To: balbi, gregkh, thierry.reding, jonathanh, yuehaibing, nkristam,
felipe.balbi
Cc: linux-usb, linux-tegra, linux-kernel
platform_get_irq() will call dev_err() itself on failure,
so there is no need for the driver to also do this.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/usb/gadget/udc/tegra-xudc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index 634c2c1..fc1eafc 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -3492,11 +3492,8 @@ static int tegra_xudc_probe(struct platform_device *pdev)
}
xudc->irq = platform_get_irq(pdev, 0);
- if (xudc->irq < 0) {
- dev_err(xudc->dev, "failed to get IRQ: %d\n",
- xudc->irq);
+ if (xudc->irq < 0)
return xudc->irq;
- }
err = devm_request_irq(&pdev->dev, xudc->irq, tegra_xudc_irq, 0,
dev_name(&pdev->dev), xudc);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20200116141433.57056-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message [not found] ` <20200116141433.57056-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> @ 2020-01-17 4:06 ` Nagarjuna Kristam 2020-01-17 11:44 ` Thierry Reding 1 sibling, 0 replies; 3+ messages in thread From: Nagarjuna Kristam @ 2020-01-17 4:06 UTC (permalink / raw) To: YueHaibing, balbi-DgEjT+Ai2ygdnm+yROfE0A, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w, jonathanh-DDmLM1+adcrQT0dZR+AlfA, felipe.balbi-VuQAYsv1563Yd54FQh9/CA Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA Reviewed-by: Nagarjuna Kristam <nkristam-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> On 16-01-2020 19:44, YueHaibing wrote: > External email: Use caution opening links or attachments > > > platform_get_irq() will call dev_err() itself on failure, > so there is no need for the driver to also do this. > This is detected by coccinelle. > > Signed-off-by: YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> > --- > drivers/usb/gadget/udc/tegra-xudc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c > index 634c2c1..fc1eafc 100644 > --- a/drivers/usb/gadget/udc/tegra-xudc.c > +++ b/drivers/usb/gadget/udc/tegra-xudc.c > @@ -3492,11 +3492,8 @@ static int tegra_xudc_probe(struct platform_device *pdev) > } > > xudc->irq = platform_get_irq(pdev, 0); > - if (xudc->irq < 0) { > - dev_err(xudc->dev, "failed to get IRQ: %d\n", > - xudc->irq); > + if (xudc->irq < 0) > return xudc->irq; > - } > > err = devm_request_irq(&pdev->dev, xudc->irq, tegra_xudc_irq, 0, > dev_name(&pdev->dev), xudc); > -- > 2.7.4 > > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message [not found] ` <20200116141433.57056-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 2020-01-17 4:06 ` Nagarjuna Kristam @ 2020-01-17 11:44 ` Thierry Reding 1 sibling, 0 replies; 3+ messages in thread From: Thierry Reding @ 2020-01-17 11:44 UTC (permalink / raw) To: YueHaibing Cc: balbi-DgEjT+Ai2ygdnm+yROfE0A, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, jonathanh-DDmLM1+adcrQT0dZR+AlfA, nkristam-DDmLM1+adcrQT0dZR+AlfA, felipe.balbi-VuQAYsv1563Yd54FQh9/CA, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 484 bytes --] On Thu, Jan 16, 2020 at 10:14:33PM +0800, YueHaibing wrote: > platform_get_irq() will call dev_err() itself on failure, > so there is no need for the driver to also do this. > This is detected by coccinelle. > > Signed-off-by: YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> > --- > drivers/usb/gadget/udc/tegra-xudc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-17 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-16 14:14 [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message YueHaibing
[not found] ` <20200116141433.57056-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2020-01-17 4:06 ` Nagarjuna Kristam
2020-01-17 11:44 ` Thierry Reding
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox