lwtunnel: remove unused but set variable
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Tue, 14 Mar 2017 06:04:48 +0000 (23:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Mar 2017 06:55:45 +0000 (23:55 -0700)
silences the below warning:
net/core/lwtunnel.c: In function ‘lwtunnel_valid_encap_type_attr’:
net/core/lwtunnel.c:165:17: warning: variable ‘nla’ set but not used
[-Wunused-but-set-variable]

Fixes: 9ed59592e3e3 ("lwtunnel: fix autoload of lwt modules")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/lwtunnel.c

index 6df9f8fabf0ca5d2ced3070406900b7ec28a7924..b5888190223c4d3978639c81fdec3a19dd6ee8f2 100644 (file)
@@ -162,7 +162,6 @@ int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int remaining)
        struct rtnexthop *rtnh = (struct rtnexthop *)attr;
        struct nlattr *nla_entype;
        struct nlattr *attrs;
-       struct nlattr *nla;
        u16 encap_type;
        int attrlen;
 
@@ -170,7 +169,6 @@ int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int remaining)
                attrlen = rtnh_attrlen(rtnh);
                if (attrlen > 0) {
                        attrs = rtnh_attrs(rtnh);
-                       nla = nla_find(attrs, attrlen, RTA_ENCAP);
                        nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE);
 
                        if (nla_entype) {