From patchwork Thu Sep 30 19:17:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitris Michailidis X-Patchwork-Id: 66239 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.180.67]) by ozlabs.org (Postfix) with ESMTP id B2350B70A5 for ; Fri, 1 Oct 2010 05:24:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756301Ab0I3TYO (ORCPT ); Thu, 30 Sep 2010 15:24:14 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:21248 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756278Ab0I3TYN (ORCPT ); Thu, 30 Sep 2010 15:24:13 -0400 Received: from maui.asicdesigners.com (maui.asicdesigners.com [10.192.180.15]) by stargate.chelsio.com (8.13.1/8.13.1) with SMTP id o8UJOCph031116 for ; Thu, 30 Sep 2010 12:24:12 -0700 Received: from darkside.asicdesigners.com ([10.192.161.150]) by maui.asicdesigners.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 30 Sep 2010 12:17:12 -0700 Received: from darkside.asicdesigners.com (localhost.localdomain [127.0.0.1]) by darkside.asicdesigners.com (8.13.4/8.13.4) with ESMTP id o8UJHCJL001575; Thu, 30 Sep 2010 12:17:12 -0700 Received: (from dm@localhost) by darkside.asicdesigners.com (8.13.4/8.13.4/Submit) id o8UJHC4p001574; Thu, 30 Sep 2010 12:17:12 -0700 From: Dimitris Michailidis To: netdev@vger.kernel.org Cc: Dimitris Michailidis Subject: [PATCH net-next] cxgb4: remove a bogus PCI function number check Date: Thu, 30 Sep 2010 12:17:12 -0700 Message-Id: <1285874232-1554-1-git-send-email-dm@chelsio.com> X-Mailer: git-send-email 1.5.4 X-OriginalArrivalTime: 30 Sep 2010 19:17:12.0388 (UTC) FILETIME=[15B7A040:01CB60D4] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove a bogus PCI function number check from the driver's .remove method that causes pci_release_regions not to be called for function 0 if additional functions are attached and one of them is used as primary. Signed-off-by: Dimitris Michailidis --- drivers/net/cxgb4/cxgb4_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 4fb08e3..22169a7 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -3863,7 +3863,7 @@ static void __devexit remove_one(struct pci_dev *pdev) pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); - } else if (PCI_FUNC(pdev->devfn) > 0) + } else pci_release_regions(pdev); }