From 9b76530d39d5741f806b13ee380908fdc0dd948f Mon Sep 17 00:00:00 2001 From: Ioannis Valasakis Date: Fri, 9 Nov 2018 13:53:24 +0000 Subject: [PATCH] staging: greybus: shorten comparison to NULL Shorten pointer NULL check by simple truth test. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman --- 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 dafa430d176e..5d14a4e8dada 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; -- 2.25.1