From patchwork Wed Jan 28 19:25:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 20661 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id EAE94DE02E for ; Thu, 29 Jan 2009 06:25:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751606AbZA1TZn (ORCPT ); Wed, 28 Jan 2009 14:25:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751565AbZA1TZn (ORCPT ); Wed, 28 Jan 2009 14:25:43 -0500 Received: from nf-out-0910.google.com ([64.233.182.189]:32428 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbZA1TZm (ORCPT ); Wed, 28 Jan 2009 14:25:42 -0500 Received: by nf-out-0910.google.com with SMTP id d3so1350304nfc.21 for ; Wed, 28 Jan 2009 11:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=DSsEVccEn56W3aAMYazNbRAthZy53wYuETGVFns0psU=; b=ThLaTxPALSUaygmgcWoPuCNjlbNMvOccZnpKXUAacaL/JIrYItQJGtCA880xHgc6eN oWJ6V9VgUGUMnaDp8Yrg8lCv9T09EHESeUeWUdQ3u7BClHGWXvp+eKamvsfVlgEqH6Ef JUJBdDu+Dd/JkOwWdiSBevAL8UtoM49/kuztU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=kjHeYGrhzkTSbvRJiHhLzc98SfEdhw2KyQKFOerdCVZjkAOnUvsinS7CshPa8OY54Z 1LFPkaQSsXf3/9kmUFjsfNMnUiobvEkRPhZNOBlTSA2y8yv9FrTt2tDD5JrLt+0oZTO8 rUXNJA3vkN0BLqyl5W7Pla8FLNq3QumTYUomM= Received: by 10.103.224.17 with SMTP id b17mr998698mur.61.1233170739470; Wed, 28 Jan 2009 11:25:39 -0800 (PST) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id d26sm33025649nfh.31.2009.01.28.11.25.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Jan 2009 11:25:39 -0800 (PST) Message-ID: <4980B135.8040209@gmail.com> Date: Wed, 28 Jan 2009 20:25:41 +0100 From: Roel Kluin User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: netdev@vger.kernel.org Subject: [PATCH] drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org untested, but It seems this is likely what it should be. --------------------->8---------8<---------------- fix inverted logic Signed-off-by: Roel Kluin --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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: