lkml.org 
[lkml]   [2017]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/3] char/bsr: Adjust one function call together with a variable assignment
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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
\
 
 \ /
  Last update: 2017-10-15 22:10    [W:3.105 / U:3.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site