drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 30 Jan 2009 01:32:20 +0000 (17:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Jan 2009 01:32:20 +0000 (17:32 -0800)
Fix inverted logic

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/skfp/skfddi.c

index 607efeaf0bc5cd00949fcdb3feaf7ec7f2b03305..9a00e5566af74db199d2625db4903ecd58e3b9e8 100644 (file)
@@ -1003,9 +1003,9 @@ static int skfp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                break;
        case SKFP_CLR_STATS:    /* Zero out the driver statistics */
                if (!capable(CAP_NET_ADMIN)) {
-                       memset(&lp->MacStat, 0, sizeof(lp->MacStat));
-               } else {
                        status = -EPERM;
+               } else {
+                       memset(&lp->MacStat, 0, sizeof(lp->MacStat));
                }
                break;
        default: