2022-07-19 07:21:09

by Yang Yingliang

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

It should be 'ret_link' passed to PTR_ERR().

Fixes: d534b9520a12 ("media: vimc: add ancillary lens")
Signed-off-by: Yang Yingliang <[email protected]>
---
drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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;
}
}
--
2.25.1


2022-07-19 14:25:28

by Kieran Bingham

[permalink] [raw]
Subject: Re: [PATCH -next] media: vimc: fix wrong pointer passed to PTR_ERR() in vimc_create_links()

Hi Yang,

Quoting Yang Yingliang (2022-07-19 08:17:21)
> It should be 'ret_link' passed to PTR_ERR().
>
> Fixes: d534b9520a12 ("media: vimc: add ancillary lens")
> Signed-off-by: Yang Yingliang <[email protected]>

I believe this patch is correct, and it even has a fixes tag, which is
perhaps one up on the previous one [0] from Hans, though I think he
perhaps sent that before d534b9520a12 was even pushed

But Hans' patch was sent first, so it might be ahead of the race.

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


But for which ever one gets chosen:

Reviewed-by: Kieran Bingham <[email protected]>


> ---
> drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }
> }
> --
> 2.25.1
>