net: hostess_sv11: move out assignment in if condition
authorPeng Li <lipeng321@huawei.com>
Fri, 18 Jun 2021 02:32:19 +0000 (10:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jun 2021 18:42:39 +0000 (11:42 -0700)
Should not use assignment in if condition.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/hostess_sv11.c

index a18c09d..8dce8b1 100644 (file)
@@ -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;
 }