Skip to content

Commit

Permalink
memory: samsung: exynos5422-dmc: handle clk_set_parent() failure
Browse files Browse the repository at this point in the history
clk_set_parent() can fail and ignoring such case could lead to invalid
clock setup for given frequency.

Addresses-Coverity: Unchecked return value
Fixes: 6e7674c ("memory: Add DMC driver for Exynos5422")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20210407154535.70756-1-krzysztof.kozlowski@canonical.com
  • Loading branch information
Krzysztof Kozlowski committed Apr 13, 2021
1 parent 59e27d7 commit 132c17c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/memory/samsung/exynos5422-dmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,9 @@ static int exynos5_dmc_init_clks(struct exynos5_dmc *dmc)

dmc->curr_volt = target_volt;

clk_set_parent(dmc->mout_mx_mspll_ccore, dmc->mout_spll);
ret = clk_set_parent(dmc->mout_mx_mspll_ccore, dmc->mout_spll);
if (ret)
return ret;

clk_prepare_enable(dmc->fout_bpll);
clk_prepare_enable(dmc->mout_bpll);
Expand Down

0 comments on commit 132c17c

Please sign in to comment.