net: fix two coding style issues
authorMichal Kubecek <mkubecek@suse.cz>
Fri, 26 Apr 2019 09:13:12 +0000 (11:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Apr 2019 21:03:44 +0000 (17:03 -0400)
This is a simple cleanup addressing two coding style issues found by
checkpatch.pl in an earlier patch. It's submitted as a separate patch to
keep the original patch as it was generated by spatch.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c
net/decnet/dn_table.c

index 0914477c47197bbd214e03cde8e856c87c2029b5..348ddb6d09bbaa2cbaafc1b5ff30aadde6417704 100644 (file)
@@ -413,9 +413,9 @@ static int br_fill_ifinfo(struct sk_buff *skb,
                goto nla_put_failure;
 
        if (event == RTM_NEWLINK && port) {
-               struct nlattr *nest
-                       = nla_nest_start(skb, IFLA_PROTINFO);
+               struct nlattr *nest;
 
+               nest = nla_nest_start(skb, IFLA_PROTINFO);
                if (nest == NULL || br_port_fill_attrs(skb, port) < 0)
                        goto nla_put_failure;
                nla_nest_end(skb, nest);
index 2fb764321b97acacbaa74293509a166f1741fdaa..33fefb0aebca4687a3d119f70ba56a587d238b17 100644 (file)
@@ -348,7 +348,8 @@ static int dn_fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
                struct rtnexthop *nhp;
                struct nlattr *mp_head;
 
-               if (!(mp_head = nla_nest_start_noflag(skb, RTA_MULTIPATH)))
+               mp_head = nla_nest_start_noflag(skb, RTA_MULTIPATH);
+               if (!mp_head)
                        goto errout;
 
                for_nexthops(fi) {