[IPV6]: Clear up user copy warning in flowlabel code.
authorDavid S. Miller <davem@davemloft.net>
Mon, 30 May 2005 03:28:01 +0000 (20:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 May 2005 03:28:01 +0000 (20:28 -0700)
We are intentionally ignoring the copy_to_user() value,
make it clear to the compiler too.

Noted by Jeff Garzik.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_flowlabel.c

index a93f6dc51979f84f61e5fc277a451d5fdcdb1032..0e5f7499debb81ce758d4e788d2182d07c5d2b53 100644 (file)
@@ -535,10 +535,12 @@ release:
                if (err)
                        goto done;
 
-               /* Do not check for fault */
-               if (!freq.flr_label)
-                       copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,
-                                    &fl->label, sizeof(fl->label));
+               if (!freq.flr_label) {
+                       if (copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,
+                                        &fl->label, sizeof(fl->label))) {
+                               /* Intentionally ignore fault. */
+                       }
+               }
 
                sfl1->fl = fl;
                sfl1->next = np->ipv6_fl_list;