]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:09 +0000 (14:23 +0200)
commit8f719ae2c278545dfdeabc6f8398035a8dd9d9d1
treec2acdef4c0d5002bd9b4cb49485f6d73e09c52b8
parent0c098055db243f1fa8520d1b0602a44dc5eb393d
clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init()

[ Upstream commit 08e66ee0429b5588f8582ead4b2331e3695fa64d ]

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: e453636b89ee ("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