diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-09-15 10:36:54 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-16 00:05:57 +0100 |
commit | 7803e329bb8357afe94e8e5c3f78478d6a98d1b5 (patch) | |
tree | c3be080ef81f37e6a19dc636c90a443453dc7a3a /sound/soc/samsung/s3c24xx_uda134x.c | |
parent | 5e538ecade22a5ec4c8e18d494db0ecf924254eb (diff) |
ASoC: samsung: Fix checking return value of clk_get
clk_get() returns a pointer to the struct clk or an ERR_PTR().
This patch also use PTR_ERR() for return value.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung/s3c24xx_uda134x.c')
-rw-r--r-- | sound/soc/samsung/s3c24xx_uda134x.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index dc9d551f678..65c1cfd47d8 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -66,17 +66,17 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) pr_debug("%s %d\n", __func__, clk_users); if (clk_users == 0) { xtal = clk_get(&s3c24xx_uda134x_snd_device->dev, "xtal"); - if (!xtal) { + if (IS_ERR(xtal)) { printk(KERN_ERR "%s cannot get xtal\n", __func__); - ret = -EBUSY; + ret = PTR_ERR(xtal); } else { pclk = clk_get(&s3c24xx_uda134x_snd_device->dev, "pclk"); - if (!pclk) { + if (IS_ERR(pclk)) { printk(KERN_ERR "%s cannot get pclk\n", __func__); clk_put(xtal); - ret = -EBUSY; + ret = PTR_ERR(pclk); } } if (!ret) { |