ASoC: samsung: snow: simplify error handling

cppcheck warning:

sound/soc/samsung/snow.c:219:9: warning: Identical condition and
return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/samsung/snow.c:215:6: note: If condition 'ret' is true, the
function will return/exit
if (ret)
     ^
sound/soc/samsung/snow.c:219: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-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Pierre-Louis Bossart 2022-05-20 16:17:18 -05:00 committed by Mark Brown
parent 59a6cc5c5d
commit 0c57064e3f
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -216,7 +216,7 @@ static int snow_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, ret,
"snd_soc_register_card failed\n");
return ret;
return 0;
}
static int snow_remove(struct platform_device *pdev)