From 7803e329bb8357afe94e8e5c3f78478d6a98d1b5 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 15 Sep 2011 10:36:54 +0800 Subject: 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/samsung/s3c2412-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/soc/samsung/s3c2412-i2s.c') diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 841ab14c110..7ab8e2c2921 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -69,10 +69,10 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai) s3c2412_i2s.dma_playback = &s3c2412_i2s_pcm_stereo_out; s3c2412_i2s.iis_cclk = clk_get(dai->dev, "i2sclk"); - if (s3c2412_i2s.iis_cclk == NULL) { + if (IS_ERR(s3c2412_i2s.iis_cclk)) { pr_err("failed to get i2sclk clock\n"); iounmap(s3c2412_i2s.regs); - return -ENODEV; + return PTR_ERR(s3c2412_i2s.iis_cclk); } /* Set MPLL as the source for IIS CLK */ -- cgit v1.2.3-70-g09d2