linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ata: delete redundant printing of return value
@ 2021-03-13  7:47 Wang Qing
  2021-03-13 10:16 ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Qing @ 2021-03-13  7:47 UTC (permalink / raw)
  To: Jens Axboe, linux-ide, linux-kernel; +Cc: Wang Qing

platform_get_irq() has already checked and printed the return value, 
the printing here is nothing special, it is not necessary at all.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/ata/sata_highbank.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 64b2ef1..a43d42a
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -469,10 +469,8 @@ static int ahci_highbank_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		dev_err(dev, "no irq\n");
+	if (irq <= 0)
 		return -EINVAL;
-	}
 
 	hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
 	if (!hpriv) {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH 1/2] ata: delete redundant printing of return value
@ 2021-03-13  7:46 Wang Qing
  2021-03-13 10:04 ` Sergei Shtylyov
  2021-03-13 12:07 ` Hans de Goede
  0 siblings, 2 replies; 5+ messages in thread
From: Wang Qing @ 2021-03-13  7:46 UTC (permalink / raw)
  To: Hans de Goede, Jens Axboe, linux-ide, linux-kernel; +Cc: Wang Qing

platform_get_irq() has already checked and printed the return value, 
the printing here is nothing special, it is not necessary at all.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/ata/libahci_platform.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index de638da..2e7ea75
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -582,11 +582,8 @@ int ahci_platform_init_host(struct platform_device *pdev,
 	int i, irq, n_ports, rc;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		if (irq != -EPROBE_DEFER)
-			dev_err(dev, "no irq\n");
+	if (irq <= 0)
 		return irq;
-	}
 
 	hpriv->irq = irq;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-13 12:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13  7:47 [PATCH 1/2] ata: delete redundant printing of return value Wang Qing
2021-03-13 10:16 ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2021-03-13  7:46 Wang Qing
2021-03-13 10:04 ` Sergei Shtylyov
2021-03-13 12:07 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).