summaryrefslogtreecommitdiff
path: root/net/openvswitch/flow_netlink.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-06-02 01:13:34 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-02 01:13:34 -0700
commitfd95dadf54bf08e910a4cad0bbce8d25e8813429 (patch)
tree7824cada0e10c6bb934c59b3b8a3aeb09b1e812f /net/openvswitch/flow_netlink.c
parent33b2567cd52c95ad3b33578aaa200d53aa4d4dbc (diff)
parent9848856fe15cdad6b64b5883bb4c30528b358f7d (diff)
Merge "Merge android-4.4.133 (3f51ea2) into msm-4.4"
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r--net/openvswitch/flow_netlink.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 21e4d339217e..624c4719e404 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -1141,13 +1141,10 @@ static void nlattr_set(struct nlattr *attr, u8 val,
/* The nlattr stream should already have been validated */
nla_for_each_nested(nla, attr, rem) {
- if (tbl[nla_type(nla)].len == OVS_ATTR_NESTED) {
- if (tbl[nla_type(nla)].next)
- tbl = tbl[nla_type(nla)].next;
- nlattr_set(nla, val, tbl);
- } else {
+ if (tbl[nla_type(nla)].len == OVS_ATTR_NESTED)
+ nlattr_set(nla, val, tbl[nla_type(nla)].next ? : tbl);
+ else
memset(nla_data(nla), val, nla_len(nla));
- }
if (nla_type(nla) == OVS_KEY_ATTR_CT_STATE)
*(u32 *)nla_data(nla) &= CT_SUPPORTED_MASK;