Message ID | 20200116141433.57056-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 49f1997ad2e2e2d05917146e94dcb0ad600b866a |
Headers | show |
Series | [-next] usb: gadget: xudc: Remove redundant platform_get_irq error message | expand |
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> 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@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 > >
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@huawei.com> > --- > drivers/usb/gadget/udc/tegra-xudc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Acked-by: Thierry Reding <treding@nvidia.com>
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);
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(-)