[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1623941615-26966-3-git-send-email-lipeng321@huawei.com>
Date: Thu, 17 Jun 2021 22:53:31 +0800
From: Peng Li <lipeng321@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <xie.he.0141@...il.com>,
<ms@....tdt.de>, <willemb@...gle.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<huangguangbin2@...wei.com>
Subject: [PATCH net-next 2/6] net: hostess_sv11: move out assignment in if condition
Should not use assignment in if condition.
Signed-off-by: Peng Li <lipeng321@...wei.com>
---
drivers/net/wan/hostess_sv11.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
index a18c09d..8dce8b1 100644
--- a/drivers/net/wan/hostess_sv11.c
+++ b/drivers/net/wan/hostess_sv11.c
@@ -340,7 +340,8 @@ static struct z8530_dev *sv11_unit;
int init_module(void)
{
- if ((sv11_unit = sv11_init(io, irq)) == NULL)
+ sv11_unit = sv11_init(io, irq);
+ if (!sv11_unit)
return -ENODEV;
return 0;
}
--
2.8.1
Powered by blists - more mailing lists