Commit aca1a52
ACPI: bus: allow _UID matching for integer zero
Commit b2b32a1 ("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: b2b32a1 ("ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types")
Signed-off-by: Raag Jadav <[email protected]>
[ rjw: Comment adjustment ]
Signed-off-by: Rafael J. Wysocki <[email protected]>1 parent fec50db commit aca1a52
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
| 914 | + | |
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
920 | | - | |
| 920 | + | |
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
925 | 927 | | |
926 | 928 | | |
927 | 929 | | |
| |||
0 commit comments