aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarnabás Pőcze <[email protected]>2021-09-04 17:55:52 +0000
committerHans de Goede <[email protected]>2021-09-14 12:26:01 +0200
commit6e0bc588a0842dd740cb692d1398a48a26ed112c (patch)
treef09e6c1cae17eac9466b9b66a3fe02adf77367b9
parent6133913a820972e1710107f6f08b574e8e89d753 (diff)
platform/x86: wmi: use !p to check for NULL
Other parts of the code use the `!p` idiom to check for NULL pointers, convert `find_guid_context()` to do the same. Signed-off-by: Barnabás Pőcze <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r--drivers/platform/x86/wmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 9ed862254597..38364534e9eb 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -141,10 +141,10 @@ static const void *find_guid_context(struct wmi_block *wblock,
const struct wmi_device_id *id;
guid_t guid_input;
- if (wdriver->id_table == NULL)
+ id = wdriver->id_table;
+ if (!id)
return NULL;
- id = wdriver->id_table;
while (*id->guid_string) {
if (guid_parse(id->guid_string, &guid_input))
continue;