[PATCH 14/14] staging: greybus: core: Fix NULL comparison to preferred style.

chatzi.emanuel at gmail.com chatzi.emanuel at gmail.com
Tue Jan 3 14:33:16 UTC 2017


From: Emmanuil Chatzipetru <chatzi.emanuel at gmail.com>

Fix coding style issue caught by checkpatch.pl related to the following
warning:
	- CHECK: Comparison to NULL could be written "!id"

Signed-off-by: Emmanuil Chatzipetru <chatzi.emanuel at 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 d4df98c83a73..5f9412c51dae 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -49,7 +49,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;
-- 
2.1.4



More information about the devel mailing list