ASoC: tas2552: Propagate the error code in suspend/resume
authorFabio Estevam <[email protected]>
Tue, 25 Apr 2017 00:43:49 +0000 (21:43 -0300)
committerMark Brown <[email protected]>
Tue, 25 Apr 2017 15:40:17 +0000 (16:40 +0100)
tas2552_suspend() and tas2552_resume() currently always return success,
even though they may fail.

Fix this behaviour by always propagating the error code.

Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Dan Murphy <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
sound/soc/codecs/tas2552.c

index fd5251e98ecac35af26f4093cdcef36301bdd0b0..8840f72f3c4ad7f2a2b5f8bcb0cb54745d8dfbf1 100644 (file)
@@ -637,7 +637,7 @@ static int tas2552_suspend(struct snd_soc_codec *codec)
        if (ret != 0)
                dev_err(codec->dev, "Failed to disable supplies: %d\n",
                        ret);
-       return 0;
+       return ret;
 }
 
 static int tas2552_resume(struct snd_soc_codec *codec)
@@ -653,7 +653,7 @@ static int tas2552_resume(struct snd_soc_codec *codec)
                        ret);
        }
 
-       return 0;
+       return ret;
 }
 #else
 #define tas2552_suspend NULL