From: Axel Lin Date: Wed, 24 Nov 2010 07:20:48 +0000 (+0800) Subject: ASoC: Return proper error for omap3pandora_soc_init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c12d20145ce30f9f8b7415d36dace5fb4dcc4f0;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ASoC: Return proper error for omap3pandora_soc_init Return PTR_ERR(omap3pandora_dac_reg) instead of 0 if regulator_get failed. Signed-off-by: Axel Lin Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index dbd9d96b5f92..4ee33ce2cb98 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c @@ -306,6 +306,7 @@ static int __init omap3pandora_soc_init(void) pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n", dev_name(&omap3pandora_snd_device->dev), PTR_ERR(omap3pandora_dac_reg)); + ret = PTR_ERR(omap3pandora_dac_reg); goto fail3; }