diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-09-15 04:36:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-16 01:05:57 +0200 |
commit | 7803e329bb8357afe94e8e5c3f78478d6a98d1b5 (patch) | |
tree | c3be080ef81f37e6a19dc636c90a443453dc7a3a /sound/soc/samsung/s3c24xx-i2s.c | |
parent | ASoC: improve asynchronous mode support in the fsl_ssi driver (diff) | |
download | linux-7803e329bb8357afe94e8e5c3f78478d6a98d1b5.tar.xz linux-7803e329bb8357afe94e8e5c3f78478d6a98d1b5.zip |
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-i2s.c')
-rw-r--r-- | sound/soc/samsung/s3c24xx-i2s.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 63d8849d80bd..21c92e2e3007 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -383,10 +383,10 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai) return -ENXIO; s3c24xx_i2s.iis_clk = clk_get(dai->dev, "iis"); - if (s3c24xx_i2s.iis_clk == NULL) { + if (IS_ERR(s3c24xx_i2s.iis_clk)) { pr_err("failed to get iis_clock\n"); iounmap(s3c24xx_i2s.regs); - return -ENODEV; + return PTR_ERR(s3c24xx_i2s.iis_clk); } clk_enable(s3c24xx_i2s.iis_clk); |