drm: Remove unnecessary print function dev_err()
Subsystems (3)
PATCH 1/1 drm: Remove unnecessary print function dev_err()
The print function dev_err() is redundant because platform_get_irq() already prints an error.
Eliminate the follow coccicheck warning:
./drivers/gpu/drm/sprd/sprd_dpu.c:808:2-9: line 808 is redundant because platform_get_irq() already prints an error
Signed-off-by Yang Li <[email protected]>
--- drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/sprd/sprd_dpu.c +1 -3
@@ -804,10 +804,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 );
Signature · 1 line
2.20.1.7.g153144c
Quoted 8 lines · Yang Li
The print function
dev_err()is redundant becauseplatform_get_irq()already prints an error.Eliminate the follow coccicheck warning:
./drivers/gpu/drm/sprd/sprd_dpu.c:808:2-9: line 808 is redundant becauseplatform_get_irq()already prints an errorSigned-off-by Yang Li <[email protected]>
Acked-by Orson Zhai <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/sprd/sprd_dpu.c +1
-4@@ -804,10 +804,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 ); --2.20.1.7.g153144c