]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] media_entity: get rid of a unused var
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 11 Dec 2015 13:25:23 +0000 (11:25 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:05 +0000 (12:19 -0200)
> > > + if (rlink != link->reverse) {
> > > + r++;
> >
> > The variable is incremented here but otherwise never used, you can remove it.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/media-entity.c

index 452af1d5a20d9cc9e27cbbbf9506b3d1a5785e20..57de11281af1c8ee52a2e4429e9c8e842626f18e 100644 (file)
@@ -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--;