All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: Change NULL comparison to Boolean Negation
@ 2019-03-04 17:43 Nishka Dasgupta
  2019-03-19  9:31 ` Johan Hovold
  0 siblings, 1 reply; 4+ messages in thread
From: Nishka Dasgupta @ 2019-03-04 17:43 UTC (permalink / raw)
  To: elder, johan, gregkh, outreachy-kernel; +Cc: Nishka Dasgupta

Change NULL comparison to boolean negation. Issue found by Checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
---
 drivers/staging/greybus/bundle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index e97b2b87ba47..376ca53f0d83 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -32,7 +32,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
 {
 	struct gb_bundle *bundle = to_gb_bundle(dev);
 
-	if (bundle->state == NULL)
+	if (!(bundle->state))
 		return sprintf(buf, "\n");
 
 	return sprintf(buf, "%s\n", bundle->state);
-- 
2.19.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-19 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-04 17:43 [PATCH] staging: greybus: Change NULL comparison to Boolean Negation Nishka Dasgupta
2019-03-19  9:31 ` Johan Hovold
2019-03-19 18:25   ` NIshka Dasgupta
2019-03-19 19:51     ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.