HomeFreeBSD

acpi: Fix error code returned in acpi_bus_get_prop

Description

acpi: Fix error code returned in acpi_bus_get_prop

ACPI implementation of device_get_property would return "-1" when
property was found, but it's type wasn't supported.
This causes device_has_property to return false in that scenario, which
arguably could be considered as incorrect.

Fix that by returning "0" in that case.

Reviewed by: bz, mw
Tested by: mw
MFC after: 2 weeks
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D33103

Details

Provenance
bag_semihalf.comAuthored on Nov 22 2021, 2:05 PM
mwCommitted on Nov 24 2021, 6:42 PM
Reviewer
bz
Differential Revision
D33103: acpi: fix device_get_property invalid return
Parents
rG60c95f316374: safexcel: Fix -Wunused-but-set-variable warnings
Branches
Unknown
Tags
Unknown