mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: fix NULL comparison checkpatch warning
@ 2016-09-29 12:03 Carlos Palminha
  0 siblings, 0 replies; only message in thread
From: Carlos Palminha @ 2016-09-29 12:03 UTC (permalink / raw)
  To: devel, linux-kernel; +Cc: thomas.petazzoni, noralf, gregkh, CARLOS.PALMINHA

Fixed the following checkpatch warnings (task #10 of eudyptula challenge):
- NULL comparison rewritten to use '!' operator

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
 drivers/staging/fbtft/fbtft_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index e9f25dd..e921183 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -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;
-- 
2.9.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-29 12:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 12:03 [PATCH] staging: fbtft: fix NULL comparison checkpatch warning Carlos Palminha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®