diff options
author | Raag Jadav <raag.jadav@intel.com> | 2024-03-28 06:55:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-17 12:23:29 +0300 |
commit | 022b7d5caebc47f07509348133d7ef9a322b0c2b (patch) | |
tree | f7ebbda89a551164889e54ef596243bf194b0f18 /drivers/acpi | |
parent | 3bc910c750f13331d0d827d997c2931b3ba8c778 (diff) | |
download | linux-022b7d5caebc47f07509348133d7ef9a322b0c2b.tar.xz |
ACPI: bus: allow _UID matching for integer zero
[ Upstream commit aca1a5287ea328fd1f7e2bfa6806646486d86a70 ]
Commit b2b32a173881 ("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: b2b32a173881 ("ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
[ rjw: Comment adjustment ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/acpi')
0 files changed, 0 insertions, 0 deletions