ASoC: jz4740-i2s: add missed checks for clk_get()
authorChuhong Yuan <hslester96@gmail.com>
Thu, 3 Dec 2020 14:42:27 +0000 (22:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:46:58 +0000 (13:46 +0100)
commit1d3b3ff7904e6a37b1cbbe870e8e69a4e801794c
tree6a44717d9b4c93bbbe930e0904324c37e8681348
parent9d721c893dd1d7739f9b506c903ef07627f835e5
ASoC: jz4740-i2s: add missed checks for clk_get()

[ Upstream commit 1c1fb2653a0c2e3f310c07eacd8fc3a10e08c97a ]

jz4740_i2s_set_sysclk() does not check the return values of clk_get(),
while the file dereferences the pointers in clk_put().
Add the missed checks to fix it.

Fixes: 11bd3dd1b7c2 ("ASoC: Add JZ4740 ASoC support")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20201203144227.418194-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/jz4740/jz4740-i2s.c