Skip to content

Commit 379f7bf

Browse files
arinc9davem330
authored andcommitted
net: dsa: mt7530: get rid of function sanity check
Get rid of checking whether functions are filled properly. priv->info which is an mt753x_info structure is filled and checked for before this check. It's unnecessary checking whether it's filled properly. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6512204 commit 379f7bf

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/net/dsa/mt7530.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,13 +3232,6 @@ mt7530_probe_common(struct mt7530_priv *priv)
32323232
if (!priv->info)
32333233
return -EINVAL;
32343234

3235-
/* Sanity check if these required device operations are filled
3236-
* properly.
3237-
*/
3238-
if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
3239-
!priv->info->phy_write_c22 || !priv->info->mac_port_get_caps)
3240-
return -EINVAL;
3241-
32423235
priv->id = priv->info->id;
32433236
priv->dev = dev;
32443237
priv->ds->priv = priv;

0 commit comments

Comments
 (0)