Message ID | 4fd23b1c-8a0a-1691-a4f9-526ec99bd193@xs4all.nl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | vimc: wrong pointer is used with PTR_ERR | expand |
Quoting Hans Verkuil (2022-07-15 16:06:05) > Fix smatch warning: > > drivers/media/test-drivers/vimc/vimc-core.c:214 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR' > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> I guess this could have a fixes tag for "media: vimc: add ancillary lens", but I can't actually see that commit in git://linuxtv.org/media_tree.git yet. Anyway, Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > 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; > } > }
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; } }
Fix smatch warning: drivers/media/test-drivers/vimc/vimc-core.c:214 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR' Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> ---