diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2022-07-25 16:09:24 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-26 13:46:52 +0300 |
commit | d346a4ad305bf3f99e5824e0c132fac7e0b53657 (patch) | |
tree | 042faf9eb270697067e3be38622d8b81a570c68f /sound/soc/atmel/mchp-spdiftx.c | |
parent | 24e89d6d7da52f8678dc111ffb0ae3590b678ef0 (diff) | |
download | linux-d346a4ad305bf3f99e5824e0c132fac7e0b53657.tar.xz |
ASoC: mchp-spdiftx: return directly ret
Avoid having patterns like:
int ret;
// ...
ret = 0;
// ...
ret = call_function();
if (ret)
return ret;
return 0;
and return directly ret for all cases.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220725130925.1781791-5-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/atmel/mchp-spdiftx.c')
-rw-r--r-- | sound/soc/atmel/mchp-spdiftx.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index d24380046435..516993280792 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -341,12 +341,10 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, ret = regmap_write(dev->regmap, SPDIFTX_MR, mr); spin_unlock(&ctrl->lock); - if (ret) { + if (ret) dev_err(dev->dev, "unable to disable TX: %d\n", ret); - return ret; - } - return 0; + return ret; } static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream, @@ -847,12 +845,10 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) err = devm_snd_soc_register_component(&pdev->dev, &mchp_spdiftx_component, &mchp_spdiftx_dai, 1); - if (err) { + if (err) dev_err(&pdev->dev, "failed to register component: %d\n", err); - return err; - } - return 0; + return err; } static struct platform_driver mchp_spdiftx_driver = { |