firmware: arm_scmi: Rework clock domain info lookups
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 10 Jan 2024 12:09:16 +0000 (12:09 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 20 Feb 2024 06:29:31 +0000 (06:29 +0000)
commitdea893a66cd5b0cbd2f215137c32962a9a0cd178
tree778e5b6706985b34e94947864128d9e78e8ae295
parent534224b958dfc5c7beca2542e27a094d64d66b1a
firmware: arm_scmi: Rework clock domain info lookups

Accessing clock domains descriptors by the index from the SCMI drivers
can potentially lead to out-of-bound violations if the SCMI drivers
misbehaves.

Use a common helper to check the consistency of such accesses.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240110120916.2482603-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/clock.c