Subject: Re: [PATCH RFC 02/10] mlx4_en: Device initialization

From: Roland Dreier <[email-masked]>
Date: Tue, 15 Jul 2008 12:21:51 -0700

> +	/* Create a netdev for each port */
 > +	mlx4_foreach_port(i, mdev->ports_map) {
 > +		mlx4_info(mdev, "Activating port:%d\n", i);
 > +		if (mlx4_en_init_netdev(mdev, i, &mdev->profile.prof[i])) {
 > +			mdev->pndev[i] = NULL;
 > +			goto err_free_netdev;
 > +		}
 > +	}
 > +	return mdev;
 > +
 > +
 > +err_free_netdev:
 > +	for (i = 0; i < dev->caps.num_ports; i++) {
 > +		if (mdev->pndev[i])
 > +			mlx4_en_destroy_netdev(mdev->pndev[i]);
 > +	}

There's a strange asymmetry between the mlx4_foreach_port() loop and the
for () loop here.