]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Make clk_bulk_get_all() return a valid "id"
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 13 Sep 2019 02:40:29 +0000 (19:40 -0700)
committerStephen Boyd <sboyd@kernel.org>
Tue, 17 Sep 2019 20:26:31 +0000 (13:26 -0700)
commitd405ebd8b045eba794d62e3fc4e3b8f874531791
tree6be091a0edf53fbcec76fb7c48c8d49a11b6d253
parent8ae2f793d21f67d4ab95029bb6873efffa36907b
clk: Make clk_bulk_get_all() return a valid "id"

The adreno driver expects the "id" field of the returned clk_bulk_data
to be filled in with strings from the clock-names property.

But due to the use of kmalloc_array() in of_clk_bulk_get_all() it
receives a list of bogus pointers instead.

Zero-initialize the "id" field and attempt to populate with strings from
the clock-names property to resolve both these issues.

Fixes: e2e2823c4160 ("clk: add new APIs to operate on all available clocks")
Fixes: 5f4862cfe345 ("drm/msm: Use generic bulk clock function")
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lkml.kernel.org/r/20190913024029.2640-1-bjorn.andersson@linaro.org
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-bulk.c