Skip to contentSkip to conversation

media: vimc: fix an error code in vimc_create_links()

PATCH In review Dan Carpenter 2 participants 2 messages Jul 19, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: vimc: fix an error code in vimc_create_links()

Use the correct "ret_link" variable instead of "link".

Fixes d534b9520a12 ("media: vimc: add ancillary lens")
---
 drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/test-drivers/vimc/vimc-core.c +1 -1
index c73f91947f44..2ae7a0f11ebf 100644
@@ -211,7 +211,7 @@ static int vimc_create_links(struct vimc_device *vimc)
 			media_create_ancillary_link(ved_primary->ent, ved_ancillary->ent);
 
 		if (IS_ERR(ret_link)) {
-			ret = PTR_ERR(link);
+			ret = PTR_ERR(ret_link);
 			goto err_rm_links;
 		}
 	}
Signature · 1 line
2.35.1
#1 lore raw

Hi Dan,

Quoting Dan Carpenter (2022-07-19 14:47:16)

Quoted 4 lines

Use the correct "ret_link" variable instead of "link".

Fixes d534b9520a12 ("media: vimc: add ancillary lens")

Thanks for the patch, but it's been preceeded twice now.

[0] https://lore.kernel.org/linux-media/[email protected]/
[1] https://lore.kernel.org/linux-media/[email protected]/

--
Kieran

Quoted 20 lines
---
 drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/test-drivers/vimc/vimc-core.c +1 -1
index c73f91947f44..2ae7a0f11ebf 100644
@@ -211,7 +211,7 @@ static int vimc_create_links(struct vimc_device *vimc)
                        media_create_ancillary_link(ved_primary->ent, ved_ancillary->ent);
 
                if (IS_ERR(ret_link)) {
-                       ret = PTR_ERR(link);
+                       ret = PTR_ERR(ret_link);
                        goto err_rm_links;
                }
        }
Signature · 1 line
2.35.1