firmware: arm_scmi: Improve checks in the info_get operations
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 17 Aug 2022 17:27:27 +0000 (18:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Oct 2022 07:53:26 +0000 (09:53 +0200)
commit9f81dbb934fbd580687155112ec5fd4701e044c1
tree61155064291ca2c2053aedbbd7ad5fb5ee12ddcb
parent64b79e632869ad3ef6c098a4731d559381da1115
firmware: arm_scmi: Improve checks in the info_get operations

[ Upstream commit 1ecb7d27b1af6705e9a4e94415b4d8cc8cf2fbfb ]

SCMI protocols abstract and expose a number of protocol specific
resources like clocks, sensors and so on. Information about such
specific domain resources are generally exposed via an `info_get`
protocol operation.

Improve the sanity check on these operations where needed.

Link: https://lore.kernel.org/r/20220817172731.1185305-3-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/arm_scmi/clock.c
drivers/firmware/arm_scmi/sensors.c
include/linux/scmi_protocol.h