From patchwork Wed Dec 9 15:22:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 66001 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 nB9FLWTV013456 for ; Wed, 9 Dec 2009 15:21:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754784AbZLIPVY (ORCPT ); Wed, 9 Dec 2009 10:21:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752494AbZLIPVY (ORCPT ); Wed, 9 Dec 2009 10:21:24 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:44218 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754784AbZLIPVY (ORCPT ); Wed, 9 Dec 2009 10:21:24 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 9 Dec 2009 17:30:18 +0200 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Dec 2009 17:21:17 +0200 Date: Wed, 9 Dec 2009 17:22:45 +0200 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list , ewg Subject: [PATCH] mlx4_core: Cleanup bug in __mlx4_init_one() Message-ID: <20091209152245.GA1765@mtls03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 09 Dec 2009 15:21:17.0763 (UTC) FILETIME=[410B0130:01CA78E3] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17060.000 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 6f5a3cf..0c868c9 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -1294,7 +1294,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_counters_table(dev);