Commit b5817dca authored by Qinrun Dai's avatar Qinrun Dai Committed by sanglipeng
Browse files

clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails

stable inclusion
from stable-v5.10.180
commit 1fe1580521dddc86d26401e82c44c793e86a7a5f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1fe1580521dddc86d26401e82c44c793e86a7a5f



--------------------------------

[ Upstream commit fb735563 ]

Smatch reports:
drivers/clocksource/timer-davinci.c:332 davinci_timer_register()
warn: 'base' from ioremap() not released on lines: 274.

Fix this and other potential memory leak problems
by adding a set of corresponding exit lables.

Fixes: 721154f9 ("clocksource/drivers/davinci: Add support for clockevents")
Signed-off-by: default avatarQinrun Dai <flno@hust.edu.cn>
Link: https://lore.kernel.org/r/20230413135037.1505799-1-flno@hust.edu.cn


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 593d23ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment