ftgmac100: Remove redundant judgement
authortangbin <tangbin@cmss.chinamobile.com>
Wed, 11 Mar 2020 02:05:37 +0000 (10:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Mar 2020 20:38:19 +0000 (13:38 -0700)
In this function, ftgmac100_probe() can be triggered only
if the platform_device and platform_driver matches, so the
judgement at the beginning is redundant.

Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c

index 71a7709f7cc8e8ec9c3324de87188d8742039a49..835b7816e37284b88da63ec993710a55dcbbc613 100644 (file)
@@ -1755,9 +1755,6 @@ static int ftgmac100_probe(struct platform_device *pdev)
        struct device_node *np;
        int err = 0;
 
-       if (!pdev)
-               return -ENODEV;
-
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res)
                return -ENXIO;