summaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-10-18 15:52:57 +0200
committerStephen Boyd <sboyd@kernel.org>2022-10-28 02:08:29 +0200
commit2079d029387adfc0cc123f01a6fcf9eb6540ee4d (patch)
treed975f1f88b7eff2004a5a90e0f0c5ea2391a9ccb /fs/select.c
parentclk: Remove WARN_ON NULL parent in clk_core_init_rate_req() (diff)
downloadlinux-2079d029387adfc0cc123f01a6fcf9eb6540ee4d.tar.xz
linux-2079d029387adfc0cc123f01a6fcf9eb6540ee4d.zip
clk: Initialize the clk_rate_request even if clk_core is NULL
Since commit c35e84b09776 ("clk: Introduce clk_hw_init_rate_request()"), users that used to initialize their clk_rate_request by initializing their local structure now rely on clk_hw_init_rate_request(). This function is backed by clk_core_init_rate_req(), which will skip the initialization if either the pointer to struct clk_core or to struct clk_rate_request are NULL. However, the core->parent pointer might be NULL because the clock is orphan, and we will thus end up with our local struct clk_rate_request left untouched. And since clk_hw_init_rate_request() doesn't return an error, we will then call a determine_rate variant with that unitialized structure. In order to avoid this, let's clear our clk_rate_request if the pointer to it is valid but the pointer to struct clk_core isn't. Fixes: c35e84b09776 ("clk: Introduce clk_hw_init_rate_request()") Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20221018-clk-range-checks-fixes-v1-2-f3ef80518140@cerno.tech Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'fs/select.c')
0 files changed, 0 insertions, 0 deletions