From: Markus Elfring <[email protected]>
Date: Sun, 15 Oct 2017 21:55:26 +0200

The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <[email protected]>
---
 drivers/char/bsr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c
index d0597dfa4d88..f11df210294a 100644
--- a/drivers/char/bsr.c
+++ b/drivers/char/bsr.c
@@ -320,7 +320,8 @@ static int __init bsr_init(void)
                goto out_err_2;
        }
 
-       if ((ret = bsr_create_devs(np)) < 0) {
+       ret = bsr_create_devs(np);
+       if (ret < 0) {
                np = NULL;
                goto out_err_3;
        }
-- 
2.14.2

Reply via email to