OSDN Git Service

net: dsa: lantiq_gswip: drop bogus drvdata check
authorJohan Hovold <johan@kernel.org>
Wed, 16 Jan 2019 10:23:35 +0000 (11:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2019 20:12:19 +0000 (12:12 -0800)
The platform-device driver data is set on successful probe and will
never be NULL on remove (or we have much bigger problems).

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lantiq_gswip.c

index 5792674..27d092c 100644 (file)
@@ -1126,9 +1126,6 @@ static int gswip_remove(struct platform_device *pdev)
        struct gswip_priv *priv = platform_get_drvdata(pdev);
        int i;
 
-       if (!priv)
-               return 0;
-
        /* disable the switch */
        gswip_mdio_mask(priv, GSWIP_MDIO_GLOB_ENABLE, 0, GSWIP_MDIO_GLOB);