diff options
Diffstat (limited to 'sound/soc/fsl/imx-audmux.c')
| -rw-r--r-- | sound/soc/fsl/imx-audmux.c | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index d3bf71a0ec5..267717aa96c 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -66,13 +66,10 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,  				size_t count, loff_t *ppos)  {  	ssize_t ret; -	char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL); +	char *buf;  	int port = (int)file->private_data;  	u32 pdcr, ptcr; -	if (!buf) -		return -ENOMEM; -  	if (audmux_clk) {  		ret = clk_prepare_enable(audmux_clk);  		if (ret) @@ -85,6 +82,10 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,  	if (audmux_clk)  		clk_disable_unprepare(audmux_clk); +	buf = kmalloc(PAGE_SIZE, GFP_KERNEL); +	if (!buf) +		return -ENOMEM; +  	ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",  		       pdcr, ptcr); @@ -144,7 +145,7 @@ static const struct file_operations audmux_debugfs_fops = {  	.llseek = default_llseek,  }; -static void __init audmux_debugfs_init(void) +static void audmux_debugfs_init(void)  {  	int i;  	char buf[20];  | 
