Commit 38c3f8ac authored by Yao Zi's avatar Yao Zi Committed by Greg Kroah-Hartman
Browse files

platform/x86: panasonic-laptop: Return errno correctly in show callback



[ Upstream commit 5c7bebc1 ]

When an error occurs in sysfs show callback, we should return the errno
directly instead of formatting it as the result, which produces
meaningless output and doesn't inform the userspace of the error.

Fixes: 468f96bf ("platform/x86: panasonic-laptop: Add support for battery charging threshold (eco mode)")
Fixes: d5a81d8e ("platform/x86: panasonic-laptop: Add support for optical driver power in Y and W series")
Signed-off-by: default avatarYao Zi <ziyao@disroot.org>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241118064637.61832-3-ziyao@disroot.org


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0f7f31aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment