[patch 19/47] drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic

Greg KH
2009-02-14T01:08:29Z

[-- Attachment #1: drivers-net-skfp-if-capable-inverted-logic.patch --]
[-- Type: text/plain, Size: 871 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

From: Roel Kluin <roel.kluin@gmail.com>

[ 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -998,9 +998,9 @@ static int skfp_ioctl(struct net_device
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;