Subject: [PATCH] drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic

From: Roel Kluin <[email-masked]>
Date: Wed, 28 Jan 2009 20:25:41 +0100

untested, but It seems this is likely what it should be.
--------------------->8---------8<----------------
fix inverted logic

Signed-off-by: Roel Kluin <[email-masked]>
---
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 607efea..9a00e55 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -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: