diff mbox series

[-next] scsi: ufshcd: Remove dev_err() on platform_get_irq() failure

Message ID 20191101140058.23212-1-yuehaibing@huawei.com (mailing list archive)
State Mainlined
Commit 70e8d9accd0a9165972031ff51b4f28ee8287c0f
Headers show
Series [-next] scsi: ufshcd: Remove dev_err() on platform_get_irq() failure | expand

Commit Message

Yue Haibing Nov. 1, 2019, 2 p.m. UTC
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/scsi/ufs/ufshcd-pltfrm.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Martin K. Petersen Nov. 13, 2019, 2:31 a.m. UTC | #1
YueHaibing,

> 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.

Applied to 5.5/scsi-queue, thanks.
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 8d40dc9..76f9be7 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -402,7 +402,6 @@  int ufshcd_pltfrm_init(struct platform_device *pdev,
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "IRQ resource not available\n");
 		err = -ENODEV;
 		goto out;
 	}