summaryrefslogtreecommitdiff
path: root/drivers/fpga/intel-m10-bmc-sec-update.c
diff options
context:
space:
mode:
authorMarco Pagani <marpagan@redhat.com>2023-01-25 17:06:22 +0300
committerXu Yilun <yilun.xu@intel.com>2023-01-28 18:34:06 +0300
commit48ca6e5fa4ffc40a14fe45bd5499428a5a108a68 (patch)
treed05ba4665a4c547ee1c7cfc4623fe79a00ad23cc /drivers/fpga/intel-m10-bmc-sec-update.c
parenta73c125bbbcf6185b5a77ae946aa240876b4fe71 (diff)
downloadlinux-48ca6e5fa4ffc40a14fe45bd5499428a5a108a68.tar.xz
fpga: bridge: return errors in the show() method of the "state" attribute
This patch changes the show() method of the "state" sysfs attribute to propagate errors returned by the enable_show() op. In this way, userspace can distinguish between when the bridge is actually "enabled" (i.e., allowing signals) or "disabled" (i.e., gating signals), or when there is an error. Currently, enable_show() returns an integer representing the bridge's state (enabled or disabled) or an error code. However, this integer value is interpreted in state_show() as a bool, resulting in the method printing "enabled" (i.e., the bridge allows signals to pass), without propagating the error, even when enable_show() returns an error code. Signed-off-by: Marco Pagani <marpagan@redhat.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20230125140622.176870-1-marpagan@redhat.com Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Diffstat (limited to 'drivers/fpga/intel-m10-bmc-sec-update.c')
0 files changed, 0 insertions, 0 deletions