diff options
author | Amadeusz Sławiński <[email protected]> | 2020-02-24 07:52:02 -0500 |
---|---|---|
committer | Mark Brown <[email protected]> | 2020-02-24 20:34:07 +0000 |
commit | 8308a09e87d2cb51adb186dc7d5a5c1913fb0758 (patch) | |
tree | 640f2b7cc6c206e37e845e5757ef2867991acdff | |
parent | 1c5312308c96556ae209e8eb1423c38d4a113759 (diff) |
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: 6ee927f2f01466 ('ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev')
Signed-off-by: Amadeusz Sławiński <[email protected]>
Reviewed-by: Cezary Rojewski <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
-rw-r--r-- | sound/soc/intel/skylake/skl-ssp-clk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/skl-ssp-clk.c b/sound/soc/intel/skylake/skl-ssp-clk.c index 1c0e5226cb5b..bd43885f3805 100644 --- a/sound/soc/intel/skylake/skl-ssp-clk.c +++ b/sound/soc/intel/skylake/skl-ssp-clk.c @@ -384,9 +384,11 @@ static int skl_clk_dev_probe(struct platform_device *pdev) &clks[i], clk_pdata, i); 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; } + + data->avail_clk_cnt++; } platform_set_drvdata(pdev, data); |