netfilter: ipset: Fix coding styles reported by checkpatch.pl
[firefly-linux-kernel-4.4.55.git] / net / netfilter / ipset / ip_set_hash_ipport.c
index 9a31db8ccca6ba586681020a0087e48874c16979..9d84b3dff603c98a9aa5a917b4c1314e8fd99044 100644 (file)
@@ -140,8 +140,9 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],
 
                if (e.proto == 0)
                        return -IPSET_ERR_INVALID_PROTO;
-       } else
+       } else {
                return -IPSET_ERR_MISSING_PROTO;
+       }
 
        if (!(with_ports || e.proto == IPPROTO_ICMP))
                e.port = 0;
@@ -187,8 +188,8 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],
 
                        if (ret && !ip_set_eexist(ret, flags))
                                return ret;
-                       else
-                               ret = 0;
+
+                       ret = 0;
                }
        }
        return ret;
@@ -305,8 +306,9 @@ hash_ipport6_uadt(struct ip_set *set, struct nlattr *tb[],
 
                if (e.proto == 0)
                        return -IPSET_ERR_INVALID_PROTO;
-       } else
+       } else {
                return -IPSET_ERR_MISSING_PROTO;
+       }
 
        if (!(with_ports || e.proto == IPPROTO_ICMPV6))
                e.port = 0;
@@ -329,8 +331,8 @@ hash_ipport6_uadt(struct ip_set *set, struct nlattr *tb[],
 
                if (ret && !ip_set_eexist(ret, flags))
                        return ret;
-               else
-                       ret = 0;
+
+               ret = 0;
        }
        return ret;
 }