[PATCH] fix odd_ptr_err.cocci warnings

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

 



From: kbuild test robot <lkp@xxxxxxxxx>

 PTR_ERR should normally access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes: 62c9c1442c8f ("j721e new machine driver wip")
Signed-off-by: kbuild test robot <lkp@xxxxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
---

tree:   https://github.com/omap-audio/linux-audio peter/ti-linux-4.19.y/wip
head:   62c9c1442c8f61ca93e62e1a9d8318be0abd9d9a
commit: 62c9c1442c8f61ca93e62e1a9d8318be0abd9d9a [34/34] j721e new machine driver wip
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago

 j721e-evm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/sound/soc/ti/j721e-evm.c
+++ b/sound/soc/ti/j721e-evm.c
@@ -283,7 +283,7 @@ static int j721e_get_clocks(struct platf
 		parent = devm_clk_get(&pdev->dev, clk_name);
 		kfree(clk_name);
 		if (IS_ERR(parent)) {
-			ret = PTR_ERR(clocks->parent);
+			ret = PTR_ERR(parent);
 			if (ret != -EPROBE_DEFER)
 				dev_err(&pdev->dev, "failed to acquire %s': %d\n",
 					prefix, ret);
@@ -299,7 +299,7 @@ static int j721e_get_clocks(struct platf
 		parent = devm_clk_get(&pdev->dev, clk_name);
 		kfree(clk_name);
 		if (IS_ERR(parent)) {
-			ret = PTR_ERR(clocks->parent);
+			ret = PTR_ERR(parent);
 			if (ret != -EPROBE_DEFER)
 				dev_err(&pdev->dev, "failed to acquire %s': %d\n",
 					prefix, ret);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[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