Commit 6e0bc588 authored by Barnabás Pőcze's avatar Barnabás Pőcze Committed by Hans de Goede

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: default avatarBarnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20210904175450.156801-19-pobrn@protonmail.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 6133913a
......@@ -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;
......
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