]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
clk: mediatek: assign the initial value to clk_init_data of mtk_mux
authorWeiyi Lu <weiyi.lu@mediatek.com>
Wed, 27 May 2020 06:25:49 +0000 (14:25 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commite54454530dd8da82556f55b34f65ca8d27873e11
tree4d387e368d5be0d731df705dd9041404a782d495
parent5bc57159a8c7e0bd404693bb648095e9ec725dd4
clk: mediatek: assign the initial value to clk_init_data of mtk_mux

BugLink: https://bugs.launchpad.net/bugs/1885023
commit 571cfadcc628dd5591444f7289e27445ea732f4c upstream.

When some new clock supports are introduced, e.g. [1]
it might lead to an error although it should be NULL because
clk_init_data is on the stack and it might have random values
if using without initialization.
Add the missing initial value to clk_init_data.

[1] https://android-review.googlesource.com/c/kernel/common/+/1278046

Fixes: a3ae549917f1 ("clk: mediatek: Add new clkmux register API")
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1590560749-29136-1-git-send-email-weiyi.lu@mediatek.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/clk/mediatek/clk-mux.c