From: tangbin Date: Wed, 11 Mar 2020 02:05:37 +0000 (+0800) Subject: ftgmac100: Remove redundant judgement X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=86eeb97de71018695e9dc9e1f96df7b33cb0e7d6;p=openwrt%2Fstaging%2Fblogic.git ftgmac100: Remove redundant judgement 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 71a7709f7cc8..835b7816e372 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -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;