Skip to content

Commit 68be62d

Browse files
committed
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>
1 parent 46bb0b5 commit 68be62d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/rockchip/rk3288_hdmi_analog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static struct snd_soc_card snd_soc_card_rk = {
169169

170170
static int snd_rk_mc_probe(struct platform_device *pdev)
171171
{
172-
int ret = 0;
172+
int ret;
173173
struct snd_soc_card *card = &snd_soc_card_rk;
174174
struct device_node *np = pdev->dev.of_node;
175175
struct rk_drvdata *machine;
@@ -253,7 +253,7 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
253253
return dev_err_probe(&pdev->dev, ret,
254254
"Soc register card failed\n");
255255

256-
return ret;
256+
return 0;
257257
}
258258

259259
static const struct of_device_id rockchip_sound_of_match[] = {

0 commit comments

Comments
 (0)