Summary: | [patch] led.c, set_led() always succeed even when it fails | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Bertrand Petit <bsdpr> | ||||
Component: | kern | Assignee: | Oleksandr Tymoshenko <gonzo> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | bsdpr, gonzo | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | 11.2-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
A commit references this bug: Author: gonzo Date: Tue Jan 15 00:52:41 UTC 2019 New revision: 343029 URL: https://svnweb.freebsd.org/changeset/base/343029 Log: [led] propagate error from set_led() to the caller Do not lose error condition by always returning 0 from set_led. None of the calls to set_led checks for return value at the moment so none of API consumers in base is affected. PR: 231567 Submitted by: Bertrand Petit <bsdpr@phoe.frmug.org> MFC after: 1 week Changes: head/sys/dev/led/led.c Thanks for submitting the patch, I committed it to HEAD and will handle MFC A commit references this bug: Author: gonzo Date: Sun Feb 3 14:55:22 UTC 2019 New revision: 343716 URL: https://svnweb.freebsd.org/changeset/base/343716 Log: MFC r343029: [led] propagate error from set_led() to the caller Do not lose error condition by always returning 0 from set_led. None of the calls to set_led checks for return value at the moment so none of API consumers in base is affected. PR: 231567 Submitted by: Bertrand Petit <bsdpr@phoe.frmug.org> Changes: _U stable/12/ stable/12/sys/dev/led/led.c |
Created attachment 197324 [details] Return the proper error status to the caller The return value of set_led() in sys/dev/led/ is always zero even a failure ocurr. The attached patch return the error code to the caller when an error occurs.