diff mbox series

drm/fsl-dcu: Remove redundant dev_err()

Message ID 20240918074841.2221210-1-nichen@iscas.ac.cn (mailing list archive)
State New, archived
Headers show
Series drm/fsl-dcu: Remove redundant dev_err() | expand

Commit Message

Chen Ni Sept. 18, 2024, 7:48 a.m. UTC
There is no need to call the dev_err() function directly to print a
custom message when handling an error from platform_get_irq() function
as it is going to display an appropriate error message in case of a
failure.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Dmitry Baryshkov Sept. 20, 2024, 4:16 p.m. UTC | #1
On Wed, Sep 18, 2024 at 03:48:41PM GMT, Chen Ni wrote:
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from platform_get_irq() function
> as it is going to display an appropriate error message in case of a
> failure.
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Markus Elfring Oct. 6, 2024, 8:26 a.m. UTC | #2
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from platform_get_irq() function
> as it is going to display an appropriate error message in case of a
> failure.

Can such a change description become a bit nicer with an additional
imperative wording?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc1#n94

Regards,
Markus
Dmitry Baryshkov Oct. 19, 2024, 2:57 p.m. UTC | #3
On Wed, 18 Sep 2024 15:48:41 +0800, Chen Ni wrote:
> There is no need to call the dev_err() function directly to print a
> custom message when handling an error from platform_get_irq() function
> as it is going to display an appropriate error message in case of a
> failure.
> 
> 

Applied to drm-misc-next, thanks!

[1/1] drm/fsl-dcu: Remove redundant dev_err()
      commit: 4b173d34e35726d7727d3e5edc43bcab12654ab0

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index ab6c0c6cd0e2..ad026d77a051 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -272,10 +272,8 @@  static int fsl_dcu_drm_probe(struct platform_device *pdev)
 	}
 
 	fsl_dev->irq = platform_get_irq(pdev, 0);
-	if (fsl_dev->irq < 0) {
-		dev_err(dev, "failed to get irq\n");
+	if (fsl_dev->irq < 0)
 		return fsl_dev->irq;
-	}
 
 	fsl_dev->regmap = devm_regmap_init_mmio(dev, base,
 			&fsl_dcu_regmap_config);