]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Fix pointer casting to prevent oops in devm_clk_release()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 20 Jun 2022 17:18:15 +0000 (19:18 +0200)
committerStephen Boyd <sboyd@kernel.org>
Wed, 22 Jun 2022 23:10:23 +0000 (16:10 -0700)
commitc643c44d2f44392a6d5f7b9254ab7872792431f5
tree649f7c39377d875d4150c7f126e7fd201158d2e1
parent1834c2600c28f6e52f867137e6a05f1b0c53d8ae
clk: Fix pointer casting to prevent oops in devm_clk_release()

The release function is called with a pointer to the memory returned by
devres_alloc(). I was confused about that by the code before the
generalization that used a struct clk **ptr.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: 195372203b9a ("clk: generalize devm_clk_get() a bit")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220620171815.114212-1-u.kleine-koenig@pengutronix.de
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-devres.c