![](https://secure.gravatar.com/avatar/6f5935d8c7d3d83ae6348a4ee8090399.jpg?s=120&d=mm&r=g)
2 Nov
2016
2 Nov
'16
9:44 a.m.
On Tue, Nov 01, 2016 at 02:31:55PM +0800, Chen-Yu Tsai wrote:
In the current probe function the GPIO is acquired after the codec's bus clock is enabled. However if it fails to acquire the GPIO due to a deferred probe, it does not disable the bus clock before bailing out. This would result in the clock being enabled multiple times.
Move the code that enables the bus clock after the part that gets the GPIO, maintaining a separation between resource acquisition and device enablement in the probe function.
Signed-off-by: Chen-Yu Tsai wens@csie.org
Acked-by: Maxime Ripard maxime.ripard@free-electrons.com
Thanks, Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com