Subject: Re: [PATCH v2] net: phy: marvell: fix detection of PHY on Topaz switches

From: Marek Behún <[email-masked]>
Date: Tue, 13 Apr 2021 01:25:06 +0200

> +	/* Some internal PHYs don't have a model number. */
> +	if (reg == MII_PHYSID2 && !(val & 0x3f0) &&
> +	    chip->info->family < ARRAY_SIZE(family_prod_id_table)) {
> +		prod_id = family_prod_id_table[chip->info->family];
> +		if (prod_id)
> +			val |= prod_id >> 4;

Isn't if(prod_id) check redundant here? If prod_id is 0, the |=
statement won't do anything.

Marek