Skip to content

Commit

Permalink
ASoC: Intel: Skylake: Fix available clock counter incrementation
Browse files Browse the repository at this point in the history
Incrementation of avail_clk_cnt was incorrectly moved to error path. Put
it back to success path.

Fixes: 6ee927f ('ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev')
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200224125202.13784-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Amadeusz Sławiński authored and Mark Brown committed Feb 24, 2020
1 parent 1c53123 commit 8308a09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/intel/skylake/skl-ssp-clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8308a09

Please sign in to comment.