ipv6:fix checkpatch errors with assignment in if condition
authorWang Yufen <wangyufen@huawei.com>
Mon, 17 Feb 2014 08:53:35 +0000 (16:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2014 21:57:29 +0000 (16:57 -0500)
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrlabel.c

index d7024066bdddab2c6dba2bc9c51824bceb17eb2a..731e1e1722d9b4322f3907e57e3a1fd1994230b5 100644 (file)
@@ -504,12 +504,13 @@ static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb)
        hlist_for_each_entry_rcu(p, &ip6addrlbl_table.head, list) {
                if (idx >= s_idx &&
                    net_eq(ip6addrlbl_net(p), net)) {
-                       if ((err = ip6addrlbl_fill(skb, p,
-                                                  ip6addrlbl_table.seq,
-                                                  NETLINK_CB(cb->skb).portid,
-                                                  cb->nlh->nlmsg_seq,
-                                                  RTM_NEWADDRLABEL,
-                                                  NLM_F_MULTI)) <= 0)
+                       err = ip6addrlbl_fill(skb, p,
+                                             ip6addrlbl_table.seq,
+                                             NETLINK_CB(cb->skb).portid,
+                                             cb->nlh->nlmsg_seq,
+                                             RTM_NEWADDRLABEL,
+                                             NLM_F_MULTI);
+                       if (err <= 0)
                                break;
                }
                idx++;
@@ -567,7 +568,8 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh)
                goto out;
        }
 
-       if (!(skb = nlmsg_new(ip6addrlbl_msgsize(), GFP_KERNEL))) {
+       skb = nlmsg_new(ip6addrlbl_msgsize(), GFP_KERNEL);
+       if (!skb) {
                ip6addrlbl_put(p);
                return -ENOBUFS;
        }