Skip to content

Commit

Permalink
ASoC: tas2552: Propagate the error code in suspend/resume
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Fabio Estevam authored and broonie committed Apr 25, 2017
1 parent 7d8d2c9 commit 12dc0f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/tas2552.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -653,7 +653,7 @@ static int tas2552_resume(struct snd_soc_codec *codec)
ret);
}

return 0;
return ret;
}
#else
#define tas2552_suspend NULL
Expand Down

0 comments on commit 12dc0f3

Please sign in to comment.