1
0
Fork 0

ASoC: AMD: Fix build warning

Fixes
sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe':
sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may
be used uninitialized in this function [-Wmaybe-uninitialized]
   dev_err(&pdev->dev, "Failed to register regulator: %d\n",
ret);

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Akshu Agrawal 2018-07-26 14:04:08 +08:00 committed by Mark Brown
parent c183fec10a
commit 7699676081
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ static int cz_probe(struct platform_device *pdev)
&acp_da7219_cfg);
if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "Failed to register regulator: %d\n",
ret);
(int)PTR_ERR(rdev));
return -EINVAL;
}