Commit 8308a09e authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Mark Brown

ASoC: Intel: Skylake: Fix available clock counter incrementation

Incrementation of avail_clk_cnt was incorrectly moved to error path. Put
it back to success path.

Fixes: 6ee927f2 ('ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev')
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200224125202.13784-1-amadeuszx.slawinski@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1c531230
...@@ -384,9 +384,11 @@ static int skl_clk_dev_probe(struct platform_device *pdev) ...@@ -384,9 +384,11 @@ static int skl_clk_dev_probe(struct platform_device *pdev)
&clks[i], clk_pdata, i); &clks[i], clk_pdata, i);
if (IS_ERR(data->clk[data->avail_clk_cnt])) { if (IS_ERR(data->clk[data->avail_clk_cnt])) {
ret = PTR_ERR(data->clk[data->avail_clk_cnt++]); ret = PTR_ERR(data->clk[data->avail_clk_cnt]);
goto err_unreg_skl_clk; goto err_unreg_skl_clk;
} }
data->avail_clk_cnt++;
} }
platform_set_drvdata(pdev, data); platform_set_drvdata(pdev, data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment