linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging:greybus Fix comparison to NULL
@ 2018-06-03 12:52 Janani Sankara Babu
  2018-06-05  5:32 ` [greybus-dev] " Viresh Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Janani Sankara Babu @ 2018-06-03 12:52 UTC (permalink / raw)
  To: gregkh; +Cc: greybus-dev, devel, linux-kernel, Janani Sankara Babu

This patch replaces comparison of var to NULL with !var

Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
 drivers/staging/greybus/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index dafa430..5d14a4e 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,
 static const struct greybus_bundle_id *
 greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id)
 {
-	if (id == NULL)
+	if (!id)
 		return NULL;

 	for (; id->vendor || id->product || id->class || id->driver_info;
--
1.9.1

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

end of thread, other threads:[~2018-06-05 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-03 12:52 [PATCH] Staging:greybus Fix comparison to NULL Janani Sankara Babu
2018-06-05  5:32 ` [greybus-dev] " Viresh Kumar
2018-06-05  6:10   ` Johan Hovold
2018-06-05  9:00   ` Dan Carpenter
2018-06-05 12:36     ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).