summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2021-06-18 04:32:19 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-18 20:42:39 +0200
commitfe9be8daef8a7e6bd539fa57a9e14c6b4f8261f7 (patch)
tree1b597ab52a2e1678732076410c66af5ff467c43a /drivers/net/wan
parentnet: hostess_sv11: fix the code style issue about "foo* bar" (diff)
downloadlinux-fe9be8daef8a7e6bd539fa57a9e14c6b4f8261f7.tar.xz
linux-fe9be8daef8a7e6bd539fa57a9e14c6b4f8261f7.zip
net: hostess_sv11: move out assignment in if condition
Should not use assignment in if condition. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/hostess_sv11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
index a18c09dc335c..8dce8b190420 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;
}