* [PATCH] drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic
@ 2009-01-28 19:25 Roel Kluin
2009-01-30 1:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-01-28 19:25 UTC (permalink / raw)
To: netdev
untested, but It seems this is likely what it should be.
--------------------->8---------8<----------------
fix inverted logic
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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:
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-30 1:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28 19:25 [PATCH] drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic Roel Kluin
2009-01-30 1:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).