[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211224035539.1564861-1-jiasheng@iscas.ac.cn>
Date: Fri, 24 Dec 2021 11:55:39 +0800
From: Jiasheng Jiang <jiasheng@...as.ac.cn>
To: davem@...emloft.net, kuba@...nel.org, thunder.leizhen@...wei.com,
yangyingliang@...wei.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] fjes: Fix wrong check for irq
Because hw->hw_res.irq is unsigned, the check is useless.
Therefore, we need to correct the check by using error variable.
Fixes: db6d6afe382d ("fjes: Check for error irq")
Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
---
drivers/net/fjes/fjes_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index ebd287039a54..70fbe40a598c 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -1261,11 +1261,11 @@ static int fjes_probe(struct platform_device *plat_dev)
}
hw->hw_res.start = res->start;
hw->hw_res.size = resource_size(res);
- hw->hw_res.irq = platform_get_irq(plat_dev, 0);
- if (hw->hw_res.irq < 0) {
- err = hw->hw_res.irq;
+
+ err = platform_get_irq(plat_dev, 0);
+ if (err < 0)
goto err_free_control_wq;
- }
+ hw->hw_res.irq = err;
err = fjes_hw_init(&adapter->hw);
if (err)
--
2.25.1
Powered by blists - more mailing lists