ASoC: tegra20_ac97: Fix missing error code in tegra20_ac97_platform_probe()

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.

This was found by coccicheck:

sound/soc/tegra/tegra20_ac97.c:357 tegra20_ac97_platform_probe() warn: missing error code 'ret'.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220701072850.62408-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Jiapeng Chong 2022-07-01 15:28:50 +08:00 committed by Mark Brown
parent 446499743b
commit acf981f94e
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 0 deletions

View File

@ -354,6 +354,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
}
} else {
dev_err(&pdev->dev, "no codec-reset GPIO supplied\n");
ret = -EINVAL;
goto err_clk_put;
}
@ -361,6 +362,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
"nvidia,codec-sync-gpio", 0);
if (!gpio_is_valid(ac97->sync_gpio)) {
dev_err(&pdev->dev, "no codec-sync GPIO supplied\n");
ret = -EINVAL;
goto err_clk_put;
}