[PATCH V2 net-next 2/7] net: hostess_sv11: move out assignment in if condition

From: Peng Li
Date: Thu Jun 17 2021 - 22:36:00 EST


Should not use assignment in if condition.

Signed-off-by: Peng Li <lipeng321@xxxxxxxxxx>
---
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