clocksource/drivers/samsung_pwm: Cleanup on init error
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Thu, 6 May 2021 20:27:27 +0000 (16:27 -0400)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 4 Jun 2021 08:12:12 +0000 (10:12 +0200)
commit63e83bd8cd848a3d1b4777d90635a309fa9cb2c7
tree2113f3e83cf89de8acea2f64b9ed94dcd0e4d8ee
parentbb08e96575dbbd49acb49999dd0d7ffedb5c1608
clocksource/drivers/samsung_pwm: Cleanup on init error

Failure of timer initialization is likely to be fatal for the system, so
cleanup in such case is not strictly necessary.  However the code might
be refactored or reused, so better not to rely on such assumption that
system won't continue init failure.

Unmap the IO memory and put the clock on initialization failures from
devicetree.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210506202729.157260-3-krzysztof.kozlowski@canonical.com
drivers/clocksource/samsung_pwm_timer.c