ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d2d2c0a0f0
commit
8698475a94
@ -340,6 +340,7 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate);
|
|||||||
|
|
||||||
static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
|
static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out,
|
snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out,
|
||||||
&s3c24xx_i2s_pcm_stereo_in);
|
&s3c24xx_i2s_pcm_stereo_in);
|
||||||
|
|
||||||
@ -348,7 +349,9 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
|
|||||||
pr_err("failed to get iis_clock\n");
|
pr_err("failed to get iis_clock\n");
|
||||||
return PTR_ERR(s3c24xx_i2s.iis_clk);
|
return PTR_ERR(s3c24xx_i2s.iis_clk);
|
||||||
}
|
}
|
||||||
clk_prepare_enable(s3c24xx_i2s.iis_clk);
|
ret = clk_prepare_enable(s3c24xx_i2s.iis_clk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
|
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
|
||||||
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
|
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
|
||||||
@ -377,7 +380,11 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
|
|||||||
|
|
||||||
static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
|
static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
|
||||||
{
|
{
|
||||||
clk_prepare_enable(s3c24xx_i2s.iis_clk);
|
int ret;
|
||||||
|
|
||||||
|
ret = clk_prepare_enable(s3c24xx_i2s.iis_clk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
|
writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
|
||||||
writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
|
writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
|
||||||
|
Loading…
Reference in New Issue
Block a user