[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1615775955-4400-1-git-send-email-wangqing@vivo.com>
Date: Mon, 15 Mar 2021 10:39:14 +0800
From: Wang Qing <wangqing@...o.com>
To: Jens Axboe <axboe@...nel.dk>, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH V3] ata: sata_highbank: delete redundant print and fix return value
platform_get_irq() has already checked and printed the return value,
the printing here is nothing special, and should corrected to < 0.
Also, thhe return value should return a real error.
Signed-off-by: Wang Qing <wangqing@...o.com>
---
drivers/ata/sata_highbank.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 64b2ef1..4438ee6
--- 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");
- return -EINVAL;
- }
+ if (irq < 0)
+ return irq;
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
if (!hpriv) {
--
2.7.4
Powered by blists - more mailing lists