clk: vc5: Check IO access results
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 19 Jul 2022 09:46:36 +0000 (11:46 +0200)
committerStephen Boyd <sboyd@kernel.org>
Sat, 1 Oct 2022 00:02:40 +0000 (17:02 -0700)
commitcc3237827a21ca6fe29085a78f96b0509cf6d095
treee06eb342a104c6dd369f6a62366562a0c88337c6
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
clk: vc5: Check IO access results

The devices of the versaclk clock generator family use an I2C control bus.
IO access on an I2C bus can fail for various reasons.

The driver currently ignores the return value of most IO operations. This
results in silent failure. To avoid this check the return value and in case
of an error abort the operation and propagate the error code to the caller.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20220719094637.844946-1-lars@metafoo.de
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-versaclock5.c