diff mbox series

[-next] media: vimc: fix wrong pointer passed to PTR_ERR() in vimc_create_links()

Message ID 20220719071721.703986-1-yangyingliang@huawei.com
State New
Headers show
Series [-next] media: vimc: fix wrong pointer passed to PTR_ERR() in vimc_create_links() | expand

Commit Message

Yang Yingliang July 19, 2022, 7:17 a.m. UTC
It should be 'ret_link' passed to PTR_ERR().

Fixes: d534b9520a12 ("media: vimc: add ancillary lens")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
index c73f91947f44..2ae7a0f11ebf 100644
--- a/drivers/media/test-drivers/vimc/vimc-core.c
+++ b/drivers/media/test-drivers/vimc/vimc-core.c
@@ -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;
 		}
 	}