Message ID | 20240415-fix-cocci-v1-7-477afb23728b@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: Fix coccinelle warning/errors | expand |
Dne ponedeljek, 15. april 2024 ob 21:34:24 GMT +2 je Ricardo Ribalda napisal(a): > platform_get_irq() already prints an error for us. > > Found by cocci: > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c:389:2-9: line 389 is redundant because platform_get_irq() already prints an error > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Best regards, Jernej > --- > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c > index 5c0a45394cba..a6424fe7023b 100644 > --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c > +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c > @@ -386,7 +386,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev, > > irq = platform_get_irq(platform_dev, 0); > if (irq < 0) { > - dev_err(dev, "failed to get interrupt\n"); > ret = -ENXIO; > goto error_clock_rate_exclusive; > } > >
On Mon, Apr 15, 2024 at 07:34:24PM +0000, Ricardo Ribalda wrote: > platform_get_irq() already prints an error for us. > > Found by cocci: > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c:389:2-9: line 389 is redundant because platform_get_irq() already prints an error > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> > --- > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c > index 5c0a45394cba..a6424fe7023b 100644 > --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c > +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c > @@ -386,7 +386,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev, > > irq = platform_get_irq(platform_dev, 0); > if (irq < 0) { > - dev_err(dev, "failed to get interrupt\n"); > ret = -ENXIO; This is more fall out from when irq functions used to return zero (16 years ago). Instead of ret = -ENXIO, set ret = irq. regards, dan carpenter
diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c index 5c0a45394cba..a6424fe7023b 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c @@ -386,7 +386,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev, irq = platform_get_irq(platform_dev, 0); if (irq < 0) { - dev_err(dev, "failed to get interrupt\n"); ret = -ENXIO; goto error_clock_rate_exclusive; }
platform_get_irq() already prints an error for us. Found by cocci: drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c:389:2-9: line 389 is redundant because platform_get_irq() already prints an error Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 - 1 file changed, 1 deletion(-)