ASoC: qcom: add missing out of memory check on drvdata->clks allocation
Currently drvdata->clks is not being checked for an allocation failure, leading to potential null pointer dereferencing. Fix this by adding a check and returning -ENOMEM if an error occurred. Fixes: 1220f6a7 ("ASoC: qcom: Add common array to initialize soc based core clocks") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Rohit kumar <rohitkr@codeaurora.org> Addresses-Coverity: ("Dereference null return value") Link: https://lore.kernel.org/r/20200819160103.164893-1-colin.king@canonical.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment