drm/sprd: remove redundant error logging
authorDeepak R Varma <drv@mailo.com>
Sun, 11 Dec 2022 13:55:08 +0000 (19:25 +0530)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 20 Dec 2022 08:26:18 +0000 (09:26 +0100)
A call to platform_get_irq() already prints an error on failure within
its own implementation. So printing another error based on its return
value in the caller is redundant and should be removed. The clean up
also makes if condition block braces unnecessary. Remove that as well.

Issue identified using platform_get_irq.cocci coccicheck script.

Signed-off-by: Deepak R Varma <drv@mailo.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/Y5XhPJ39ipMCcctq@qemulion
drivers/gpu/drm/sprd/sprd_dpu.c

index 88f4259680f14252b94497d3f3ae29011d86cbdd..db0bcea1d9f4ada32adbc9b5f2ec30d3f02a672e 100644 (file)
@@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu,
        }
 
        ctx->irq = platform_get_irq(pdev, 0);
-       if (ctx->irq < 0) {
-               dev_err(dev, "failed to get dpu irq\n");
+       if (ctx->irq < 0)
                return ctx->irq;
-       }
 
        /* disable and clear interrupts before register dpu IRQ. */
        writel(0x00, ctx->base + REG_DPU_INT_EN);