acpi_ec(4): Don't probe erroneously if success occurred

In r360131, acpi_ec probe was changed to not clobber an error status prior to
several error cases that did not explicitly set the error variable before
goto'ing the exit path.  However, I did not notice that the error variable was
not set to success in the success path.  That caused all successful probes to
fail, which is obviously undesirable.

PR:		245778
Reported by:	Neel Chauhan <neel AT neelc.org>, Evilham <contact AT evilham.com>
Tested by:	Evilham
X-MFC-With:	r360131
This commit is contained in:
Conrad Meyer 2020-04-23 17:30:03 +00:00
parent 1c2fa9150d
commit 401ae7ca67
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360224

View File

@ -443,6 +443,8 @@ acpi_ec_probe(device_t dev)
if (buf.Pointer)
AcpiOsFree(buf.Pointer);
ret = rc;
out:
if (ret <= 0) {
snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s%s",