diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-24 06:24:06 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-24 06:24:06 -0400 |
commit | 8ff9f38bda4d7a49eb7afd203cddcb5d79236061 (patch) | |
tree | 0ff47ac63fd69d6ee8370148d35f8ab0d834e87c /sound/soc/fsl/imx-audmux.c | |
parent | 54128df2ba578b091c563d8e698f4944020fb8d9 (diff) | |
parent | 1abe729f783fece81d93e9a0253fd8079f19d7f6 (diff) |
Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next
Diffstat (limited to 'sound/soc/fsl/imx-audmux.c')
-rw-r--r-- | sound/soc/fsl/imx-audmux.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index d3bf71a0ec56..ac869931d7f1 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, | |||
66 | size_t count, loff_t *ppos) | 66 | size_t count, loff_t *ppos) |
67 | { | 67 | { |
68 | ssize_t ret; | 68 | ssize_t ret; |
69 | char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL); | 69 | char *buf; |
70 | int port = (int)file->private_data; | 70 | int port = (int)file->private_data; |
71 | u32 pdcr, ptcr; | 71 | u32 pdcr, ptcr; |
72 | 72 | ||
73 | if (!buf) | ||
74 | return -ENOMEM; | ||
75 | |||
76 | if (audmux_clk) { | 73 | if (audmux_clk) { |
77 | ret = clk_prepare_enable(audmux_clk); | 74 | ret = clk_prepare_enable(audmux_clk); |
78 | if (ret) | 75 | if (ret) |
@@ -85,6 +82,10 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, | |||
85 | if (audmux_clk) | 82 | if (audmux_clk) |
86 | clk_disable_unprepare(audmux_clk); | 83 | clk_disable_unprepare(audmux_clk); |
87 | 84 | ||
85 | buf = kmalloc(PAGE_SIZE, GFP_KERNEL); | ||
86 | if (!buf) | ||
87 | return -ENOMEM; | ||
88 | |||
88 | ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n", | 89 | ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n", |
89 | pdcr, ptcr); | 90 | pdcr, ptcr); |
90 | 91 | ||