]> www.infradead.org Git - users/dwmw2/linux.git/commit
clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init()
authorGuillaume Ranquet <granquet@baylibre.com>
Mon, 7 Mar 2022 17:26:56 +0000 (18:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:37 +0000 (13:57 +0200)
commit032873e766ab0e2f9db7396780132cafdbd07a74
tree78afc196af5e6cc22e524b1410608c58f9b4352a
parentb074dbcfb42011da7eb56963925bcbe5df17e63f
clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init()

[ Upstream commit 4467b8bad2401794fb89a0268c8c8257180bf60f ]

of_base->base can either be iomapped using of_io_request_and_map() or
of_iomap() depending whether or not an of_base->name has been set.

Thus check of_base->base against NULL as of_iomap() does not return a
PTR_ERR() in case of error.

Fixes: 9aea417afa6b ("clocksource/drivers/timer-of: Don't request the resource by name")
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
Link: https://lore.kernel.org/r/20220307172656.4836-1-granquet@baylibre.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/timer-of.c