Skip to content

Commit

Permalink
drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic
Browse files Browse the repository at this point in the history
Fix inverted logic

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roel Kluin authored and David S. Miller committed Jan 30, 2009
1 parent e5664bb commit c25b9ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/skfp/skfddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c25b9ab

Please sign in to comment.