Staging: fbtft: Use !x instead of x == NULL.
Subsystems (2)
PATCH 1/1 Staging: fbtft: Use !x instead of x == NULL.
Use !x instead of x == NULL.
This issue was found by checkpatch.
Signed-off-by Sandhya Bankar <[email protected]>
--- drivers/staging/fbtft/fbtft_device.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fbtft_device.c +3 -3
@@ -1401,7 +1401,7 @@ static int __init fbtft_device_init(void)long val;int ret =0 ; -if (name ==NULL ) { +if (!name) {#ifdef MODULE pr_err ("missing module parameter: 'name'\n" );return -EINVAL ;
@@ -1418,14 +1418,14 @@ static int __init fbtft_device_init(void)/* parse module parameter: gpios */ while ((p_gpio =strsep (&gpios,"," ))) { -if (strchr (p_gpio,':' ) ==NULL ) { +if (!strchr (p_gpio,':' )) {pr_err ("error: missing ':' in gpios parameter: %s\n" , p_gpio);return -EINVAL ; } p_num = p_gpio; p_name =strsep (&p_num,":" ); -if (p_name ==NULL || p_num ==NULL ) { +if (!p_name || !p_num) {pr_err ("something bad happened parsing gpios parameter: %s\n" , p_gpio);return -EINVAL ;
Signature · 1 line
1.7.1
Greg KH
maintainerdrivers/staging/fbtft/fbtft_device.c
Quoted 10 lines · Sandhya Bankar
Use !x instead of x == NULL.
This issue was found by checkpatch.Signed-off-by Sandhya Bankar <[email protected]>--- drivers/staging/fbtft/fbtft_device.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/staging/fbtft/fbtft_device.c +0
-0
How did this file get to be 0755 permissions? What are you using to edit this? It is a virtual machine somehow?
Please be more careful in the future...
thanks,
greg k-h
Greg KH
maintainerdrivers/staging/fbtft/fbtft_device.c
Quoted 10 lines · Sandhya Bankar
Use !x instead of x == NULL.
This issue was found by checkpatch.Signed-off-by Sandhya Bankar <[email protected]>--- drivers/staging/fbtft/fbtft_device.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/staging/fbtft/fbtft_device.c +0
-0
Oh, please fix up and resend.
thanks,
greg k-h