counter: stm32-timer-cnt: Add check for clk_enable()
authorJiasheng Jiang <jiashengjiangcool@gmail.com>
Mon, 4 Nov 2024 19:18:25 +0000 (19:18 +0000)
committerWilliam Breathitt Gray <wbg@kernel.org>
Tue, 5 Nov 2024 00:15:20 +0000 (09:15 +0900)
commit842c3755a6bfbfcafa4a1438078d2485a9eb1d87
tree82f8aa4b8e87460f91f95f795726b56208fac7eb
parent147359e23e5c9652ff8c5a98a51a7323bd51c94a
counter: stm32-timer-cnt: Add check for clk_enable()

Add check for the return value of clk_enable() in order to catch the
potential exception.

Fixes: c5b8425514da ("counter: stm32-timer-cnt: add power management support")
Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Link: https://lore.kernel.org/r/20241104191825.40155-1-jiashengjiangcool@gmail.com
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
drivers/counter/stm32-timer-cnt.c