diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index 5722346f954d8d..375a8e3d04cfe9 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -16,13 +16,6 @@ #include #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) { @@ -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, }; diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c index e8b28b12051a00..4bb6a74093336d 100644 --- a/sound/soc/sof/nocodec.c +++ b/sound/soc/sof/nocodec.c @@ -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; @@ -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); - return ret; - } - - return 0; + return ret; } EXPORT_SYMBOL(sof_nocodec_setup);