2019-05-15 15:13:34

by Naveen Kumar Parna

[permalink] [raw]
Subject: [PATCH v2 1/1] bsr: do not use assignment in if condition

From: Naveen Kumar Parna <[email protected]>

checkpatch.pl does not like assignment in if condition

Signed-off-by: Naveen Kumar Parna <[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 d16ba62d03a0..935d4b300340 100644
--- a/drivers/char/bsr.c
+++ b/drivers/char/bsr.c
@@ -322,7 +322,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.17.1


2019-05-15 15:18:07

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 1/1] bsr: do not use assignment in if condition

On Wed, May 15, 2019 at 08:39:52PM +0530, [email protected] wrote:
> From: Naveen Kumar Parna <[email protected]>
>
> checkpatch.pl does not like assignment in if condition
>
> Signed-off-by: Naveen Kumar Parna <[email protected]>
> ---
> drivers/char/bsr.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

If you do a v2, you always have to show below the --- line what changed
from the previous version.

v3? :)

thanks,

greg k-h