diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2022-05-20 16:17:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-06 12:35:20 +0100 |
commit | 59a6cc5c5d64ca20461fec46e450e0639b1e6410 (patch) | |
tree | 480e60c9a289b242f5cee8740c3bff376f4b48c8 /sound/soc/rockchip | |
parent | 7518be0cc120d7617a8985787196cd5776b93688 (diff) | |
download | linux-stable-59a6cc5c5d64ca20461fec46e450e0639b1e6410.tar.gz linux-stable-59a6cc5c5d64ca20461fec46e450e0639b1e6410.tar.bz2 linux-stable-59a6cc5c5d64ca20461fec46e450e0639b1e6410.zip |
ASoC: rockchip: simplify error handling
cppcheck warning:
sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: warning: Identical
condition and return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/rockchip/rk3288_hdmi_analog.c:252:6: note: If condition
'ret' is true, the function will return/exit
if (ret)
^
sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: note: Returning
identical expression 'ret'
return ret;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r-- | sound/soc/rockchip/rk3288_hdmi_analog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index bcdeddeba80c..0c6bd9a019db 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -169,7 +169,7 @@ static struct snd_soc_card snd_soc_card_rk = { static int snd_rk_mc_probe(struct platform_device *pdev) { - int ret = 0; + int ret; struct snd_soc_card *card = &snd_soc_card_rk; struct device_node *np = pdev->dev.of_node; struct rk_drvdata *machine; @@ -253,7 +253,7 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, ret, "Soc register card failed\n"); - return ret; + return 0; } static const struct of_device_id rockchip_sound_of_match[] = { |