ASoC: AMD: Fix build warning
Subsystems (3)
PATCH 1/1 ASoC: AMD: Fix build warning
Fixessound/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);
Signed-off-by Akshu Agrawal <[email protected]>
--- sound/soc/amd/acp-da7219-max98357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/acp-da7219-max98357a.c +1 -1
@@ -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 ; }
Signature · 1 line
1.9.1