diff mbox series

net:ftgmac100:remove redundant judgement

Message ID 20200311020537.12420-1-tangbin@cmss.chinamobile.com
State Accepted
Delegated to: David Miller
Headers show
Series net:ftgmac100:remove redundant judgement | expand

Commit Message

Tang Bin March 11, 2020, 2:05 a.m. UTC
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>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

David Miller March 11, 2020, 8:38 p.m. UTC | #1
From: tangbin <tangbin@cmss.chinamobile.com>
Date: Wed, 11 Mar 2020 10:05:37 +0800

> 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>

Applied to net-next, thanks.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 4572797f0..c7ed7e871 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1757,9 +1757,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;