]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
driver core: bus: Return -EIO instead of 0 when show/store invalid bus attribute
authorZijun Hu <quic_zijuhu@quicinc.com>
Wed, 24 Jul 2024 13:54:48 +0000 (21:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:52 +0000 (15:11 +0200)
commit57551835ce4176838504ce2c951670464d8f3a5b
treedd83431799314a2219cb71d4a6ec61ff33028f56
parent59eba86b811bd9edc94ee088bff39171fc01c2b8
driver core: bus: Return -EIO instead of 0 when show/store invalid bus attribute

[ Upstream commit c0fd973c108cdc22a384854bc4b3e288a9717bb2 ]

Return -EIO instead of 0 for below erroneous bus attribute operations:
 - read a bus attribute without show().
 - write a bus attribute without store().

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20240724-bus_fix-v2-1-5adbafc698fb@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/bus.c