summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-client-probes.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-28 14:55:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-28 14:55:30 +0100
commit8a29f74b7498de8b23bbbbc665b9c14ad07175d4 (patch)
tree39245b2f585068bf220da7b2291ec24cfdb11f8e /sound/soc/sof/sof-client-probes.c
parentc21c0f9a20a963f5a1874657a4e3d657503f7815 (diff)
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4 (diff)
Merge v6.4-rc4 into char-misc-next
We need the binder fixes in here for future changes and testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/sof/sof-client-probes.c')
-rw-r--r--sound/soc/sof/sof-client-probes.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/sof/sof-client-probes.c b/sound/soc/sof/sof-client-probes.c
index fff126808bc0..8d9e9d5f40e4 100644
--- a/sound/soc/sof/sof-client-probes.c
+++ b/sound/soc/sof/sof-client-probes.c
@@ -218,12 +218,7 @@ static ssize_t sof_probes_dfs_points_read(struct file *file, char __user *to,
ret = ipc->points_info(cdev, &desc, &num_desc);
if (ret < 0)
- goto exit;
-
- pm_runtime_mark_last_busy(dev);
- err = pm_runtime_put_autosuspend(dev);
- if (err < 0)
- dev_err_ratelimited(dev, "debugfs read failed to idle %d\n", err);
+ goto pm_error;
for (i = 0; i < num_desc; i++) {
offset = strlen(buf);
@@ -241,6 +236,13 @@ static ssize_t sof_probes_dfs_points_read(struct file *file, char __user *to,
ret = simple_read_from_buffer(to, count, ppos, buf, strlen(buf));
kfree(desc);
+
+pm_error:
+ pm_runtime_mark_last_busy(dev);
+ err = pm_runtime_put_autosuspend(dev);
+ if (err < 0)
+ dev_err_ratelimited(dev, "debugfs read failed to idle %d\n", err);
+
exit:
kfree(buf);
return ret;