[PATCH] ASoC: tegra20_ac97: Add missing unwind goto in tegra20_ac97_platform_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Smatch Warns:
	sound/soc/tegra/tegra20_ac97.c:321 tegra20_ac97_platform_probe()
	warn: missing unwind goto?

The goto will set the "soc_ac97_ops" and "soc_ac97_bus" operations to
NULL.  But they are already NULL at this point so it is a no-op.
However, just for consistency, change the direct return to a goto.  No
functional change.

Signed-off-by: Zihao Wang <u202012060@xxxxxxxxxxx>
Reviewed-by: Dan Carpenter <error27@xxxxxxxxx>
---
 sound/soc/tegra/tegra20_ac97.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index d23d88a10899..d00449441e5e 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -318,7 +318,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 	ac97->reset = devm_reset_control_get_exclusive(&pdev->dev, "ac97");
 	if (IS_ERR(ac97->reset)) {
 		dev_err(&pdev->dev, "Can't retrieve ac97 reset\n");
-		return PTR_ERR(ac97->reset);
+		ret = PTR_ERR(ac97->reset);
+		goto err;
 	}
 
 	ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL);
-- 
2.34.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux