diff options
author | Mark Brown <broonie@kernel.org> | 2019-07-06 13:25:26 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-06 13:25:26 +0200 |
commit | 043b35f281f5f141e7a928d27492133ef33b8119 (patch) | |
tree | 30a9598866d6b8d44ee6b3fe88506881f23e0203 /sound/soc/intel/skylake/skl-ssp-clk.c | |
parent | Merge branch 'asoc-5.2' into asoc-linus (diff) | |
parent | ASoC: SOF: Intel: implement runtime idle for CNL/APL (diff) | |
download | linux-043b35f281f5f141e7a928d27492133ef33b8119.tar.xz linux-043b35f281f5f141e7a928d27492133ef33b8119.zip |
Merge branch 'asoc-5.3' into asoc-next
Diffstat (limited to 'sound/soc/intel/skylake/skl-ssp-clk.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-ssp-clk.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/soc/intel/skylake/skl-ssp-clk.c b/sound/soc/intel/skylake/skl-ssp-clk.c index cda1b5fa7436..5bb6e40d4d3e 100644 --- a/sound/soc/intel/skylake/skl-ssp-clk.c +++ b/sound/soc/intel/skylake/skl-ssp-clk.c @@ -276,10 +276,8 @@ static void unregister_parent_src_clk(struct skl_clk_parent *pclk, static void unregister_src_clk(struct skl_clk_data *dclk) { - u8 cnt = dclk->avail_clk_cnt; - - while (cnt--) - clkdev_drop(dclk->clk[cnt]->lookup); + while (dclk->avail_clk_cnt--) + clkdev_drop(dclk->clk[dclk->avail_clk_cnt]->lookup); } static int skl_register_parent_clks(struct device *dev, @@ -381,13 +379,13 @@ static int skl_clk_dev_probe(struct platform_device *pdev) if (clks[i].rate_cfg[0].rate == 0) continue; - data->clk[i] = register_skl_clk(dev, &clks[i], clk_pdata, i); - if (IS_ERR(data->clk[i])) { - ret = PTR_ERR(data->clk[i]); + data->clk[data->avail_clk_cnt] = register_skl_clk(dev, + &clks[i], clk_pdata, i); + + if (IS_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); |