]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: dsa: mt7530: get rid of function sanity check
authorArınç ÜNAL <arinc.unal@arinc9.com>
Mon, 22 Apr 2024 07:15:17 +0000 (10:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2024 10:57:03 +0000 (11:57 +0100)
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>
drivers/net/dsa/mt7530.c

index 8a141f8496737a36b4b9ee9d2fae846f8fe856cd..842c2573dfe4e3e2dfba4ae286bf1f01232e8e88 100644 (file)
@@ -3232,13 +3232,6 @@ mt7530_probe_common(struct mt7530_priv *priv)
        if (!priv->info)
                return -EINVAL;
 
-       /* Sanity check if these required device operations are filled
-        * properly.
-        */
-       if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
-           !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps)
-               return -EINVAL;
-
        priv->id = priv->info->id;
        priv->dev = dev;
        priv->ds->priv = priv;