From patchwork Thu Dec 10 11:37:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 66233 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBABYkGC000450 for ; Thu, 10 Dec 2009 11:36:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933957AbZLJLf4 (ORCPT ); Thu, 10 Dec 2009 06:35:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933999AbZLJLf4 (ORCPT ); Thu, 10 Dec 2009 06:35:56 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:44178 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933957AbZLJLfz (ORCPT ); Thu, 10 Dec 2009 06:35:55 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 10 Dec 2009 13:45:04 +0200 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 10 Dec 2009 13:35:58 +0200 Date: Thu, 10 Dec 2009 13:37:28 +0200 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list , ewg Subject: [PATCH v2] mlx4_core: Cleanup bug in __mlx4_init_one() Message-ID: <20091210113728.GC18037@mtls03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 10 Dec 2009 11:35:59.0026 (UTC) FILETIME=[F1A93120:01CA798C] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17060.004 X-TM-AS-Result: No--4.060200-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 291a505..3cf56d9 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -1174,7 +1174,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) return 0; err_port: - for (port = 1; port <= dev->caps.num_ports; port++) + for (--port; port >= 1; --port) mlx4_cleanup_port_info(&priv->port[port]); mlx4_cleanup_mcg_table(dev);