]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:56:59 +0000 (11:56 +0200)
commit6b11ce370390e7d3e4ef5c80350a9836e0d08271
treee02fa6d80c84b0fdbe53c1c3d524d1343f25b675
parent13d30ebb2948eb360f0d8e9d398d52597d3a4054
clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init()

BugLink: https://bugs.launchpad.net/bugs/1969110
[ 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>
(cherry picked from commit df04ef63347faac344e69e3c16ff20fead158dcc)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/clocksource/timer-of.c