Skip to content
Commit aca1a528 authored by Raag Jadav's avatar Raag Jadav Committed by Rafael J. Wysocki
Browse files

ACPI: bus: allow _UID matching for integer zero



Commit b2b32a17 ("ACPI: bus: update acpi_dev_hid_uid_match() to
support multiple types") added _UID matching support for both integer
and string types, which satisfies NULL @uid2 argument for string types
using inversion, but this logic prevents _UID comparision in case the
argument is integer 0, which may result in false positives.

Fix this using _Generic(), which will allow NULL @uid2 argument for
string types as well as _UID matching for all possible integer values.

Fixes: b2b32a17 ("ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types")
Signed-off-by: default avatarRaag Jadav <raag.jadav@intel.com>
[ rjw: Comment adjustment ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent fec50db7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment