diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2017-04-24 20:43:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-04-25 11:40:17 -0400 |
commit | 12dc0f3b1ee599d3951698a2927c584700840b03 (patch) | |
tree | 2c20b9bb3d58d9bbb6a2d7d3a85ba19ed0d108ed | |
parent | 7d8d2c9482474804a5c2b33ea9218d33dbcb48ba (diff) |
ASoC: tas2552: Propagate the error code in suspend/resume
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 <fabio.estevam@nxp.com>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/tas2552.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index fd5251e98eca..8840f72f3c4a 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c | |||
@@ -637,7 +637,7 @@ static int tas2552_suspend(struct snd_soc_codec *codec) | |||
637 | if (ret != 0) | 637 | if (ret != 0) |
638 | dev_err(codec->dev, "Failed to disable supplies: %d\n", | 638 | dev_err(codec->dev, "Failed to disable supplies: %d\n", |
639 | ret); | 639 | ret); |
640 | return 0; | 640 | return ret; |
641 | } | 641 | } |
642 | 642 | ||
643 | static int tas2552_resume(struct snd_soc_codec *codec) | 643 | static int tas2552_resume(struct snd_soc_codec *codec) |
@@ -653,7 +653,7 @@ static int tas2552_resume(struct snd_soc_codec *codec) | |||
653 | ret); | 653 | ret); |
654 | } | 654 | } |
655 | 655 | ||
656 | return 0; | 656 | return ret; |
657 | } | 657 | } |
658 | #else | 658 | #else |
659 | #define tas2552_suspend NULL | 659 | #define tas2552_suspend NULL |