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>
This commit is contained in:
Peng Li 2021-06-18 10:32:19 +08:00 committed by David S. Miller
parent fefed8af5e
commit fe9be8daef

View 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;
}