Skip to content
Commit b205f585 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Wolfram Sang
Browse files

i2c: bcm2835: Fix the error handling in 'bcm2835_i2c_probe()'



Some resource should be released if an error occurs in
'bcm2835_i2c_probe()'.
Add an error handling path and the needed 'clk_disable_unprepare()' and
'clk_rate_exclusive_put()' calls.

While at it, rework the bottom of the function to use this newly added
error handling path and have an explicit and more standard "return 0;" at
the end of the normal path.

Fixes: bebff81f ("i2c: bcm2835: Model Divider in CCF")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
[wsa: rebased]
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 951285e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment