It's already done in open/close.
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
if (!str_param)
return -EINVAL;
- retval = pm_runtime_get_sync(ctx->dev);
- if (retval < 0)
- return retval;
retval = sst_get_stream(ctx, str_param);
- if (retval > 0) {
+ if (retval > 0)
ctx->stream_cnt++;
- } else {
+ else
dev_err(ctx->dev, "sst_get_stream returned err %d\n", retval);
- sst_pm_runtime_put(ctx);
- }
return retval;
}
stream->period_elapsed = NULL;
ctx->stream_cnt--;
- sst_pm_runtime_put(ctx);
+ if (retval)
+ dev_err(ctx->dev, "free stream returned err %d\n", retval);
dev_dbg(ctx->dev, "Exit\n");
return 0;