Commit 9b76530d authored by Ioannis Valasakis's avatar Ioannis Valasakis Committed by Greg Kroah-Hartman

staging: greybus: shorten comparison to NULL

Shorten pointer NULL check by simple truth test.
Reported by checkpatch.
Signed-off-by: default avatarIoannis Valasakis <code@wizofe.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7962e63a
...@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle, ...@@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,
static const struct greybus_bundle_id * static const struct greybus_bundle_id *
greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id) greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id)
{ {
if (id == NULL) if (!id)
return NULL; return NULL;
for (; id->vendor || id->product || id->class || id->driver_info; for (; id->vendor || id->product || id->class || id->driver_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment