]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
acpi_ec(4): Do not probe "successfully" if an error occurred
authorConrad Meyer <cem@FreeBSD.org>
Mon, 20 Apr 2020 18:01:45 +0000 (18:01 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Mon, 20 Apr 2020 18:01:45 +0000 (18:01 +0000)
commit4aed56306389b4b0ca8bff4ca8cf91a95d60996c
tree8573910733786d84ee99d5a44c63b85101231c48
parent129ba2d368cfca7a2d762669a258c71a22f44311
acpi_ec(4): Do not probe "successfully" if an error occurred

All of the 'goto out;' cases in this probe routine without explicit
initialization of 'ret' indicate error cases and were clearly intended
to use the initial definition of 'ret' with ENXIO.  However, 'ret' was
accidentally squashed by reuse for a subroutine call near the beginning
of probe.

Use a different variable for the subroutine status to preserve ENXIO ret
for the 'goto out's as a minimal solution to the panic reported at attach
for now.

PR: 245757
sys/dev/acpica/acpi_ec.c