Commit 58f69ee9 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] media_entity: get rid of a unused var

> > > +		if (rlink != link->reverse) {
> > > +			r++;
> >
> > The variable is incremented here but otherwise never used, you can remove it.
Suggested-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 5abad22f
......@@ -592,7 +592,6 @@ static void __media_entity_remove_link(struct media_entity *entity,
{
struct media_link *rlink, *tmp;
struct media_entity *remote;
unsigned int r = 0;
if (link->source->entity == entity)
remote = link->sink->entity;
......@@ -600,10 +599,8 @@ static void __media_entity_remove_link(struct media_entity *entity,
remote = link->source->entity;
list_for_each_entry_safe(rlink, tmp, &remote->links, list) {
if (rlink != link->reverse) {
r++;
if (rlink != link->reverse)
continue;
}
if (link->source->entity == entity)
remote->num_backlinks--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment