Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions sound/soc/sof/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
#include <linux/pm_runtime.h>
#include "sof-priv.h"

static int sof_dfsentry_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;

return 0;
}

static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{
Expand Down Expand Up @@ -79,7 +72,7 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
}

static const struct file_operations sof_dfs_fops = {
.open = sof_dfsentry_open,
.open = simple_open,
.read = sof_dfsentry_read,
.llseek = default_llseek,
};
Expand Down
9 changes: 2 additions & 7 deletions sound/soc/sof/nocodec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int sof_nocodec_setup(struct device *dev,
const struct snd_sof_dsp_ops *ops)
{
struct snd_soc_dai_link *links;
int ret;
int ret = 0;

if (!mach)
return -EINVAL;
Expand All @@ -42,12 +42,7 @@ int sof_nocodec_setup(struct device *dev,

ret = sof_bes_setup(dev, ops, links, ops->num_drv,
&sof_nocodec_card);
if (ret) {
kfree(links);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe Coccinelle will not complain if we change it to 'devm_kfree(dev, links);'
But I like reporting error and stopping probing, leave the devm free to the device freeing itself.

return ret;
}

return 0;
return ret;
}
EXPORT_SYMBOL(sof_nocodec_setup);

Expand Down