]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7704478372973c2dc8a246f40f44c06076b66f33
treee06eb342a104c6dd369f6a62366562a0c88337c6
parent3d7dcb2c5450a57f60c448f42be48fdfe456bfdf
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