Browse Source

drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic

Fix inverted logic

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Roel Kluin 16 years ago
parent
commit
c25b9abbc2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/net/skfp/skfddi.c

+ 2 - 2
drivers/net/skfp/skfddi.c

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