staging: greybus: shorten comparison to NULL
authorIoannis Valasakis <code@wizofe.uk>
Fri, 9 Nov 2018 13:53:24 +0000 (13:53 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Nov 2018 17:49:02 +0000 (09:49 -0800)
Shorten pointer NULL check by simple truth test.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/core.c

index dafa430d176ee84793bbe89656cdcddb95b7c8f3..5d14a4e8dada63c7528b9cb03ff56f50a47be5c4 100644 (file)
@@ -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;