]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Feb 2009 17:28:54 +0000 (09:28 -0800)
[ Upstream commit c25b9abbc2c2c0da88e180c3933d6e773245815a ]

Fix inverted logic

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

index a2b092bb3626b63a35ac44bec9ab6b2049242b19..b7d829fed3dfa39ffbe668e1083ad0f0b3420f32 100644 (file)
@@ -998,9 +998,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: