LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net:ftgmac100:remove redundant judgement
@ 2020-03-11 2:05 tangbin
2020-03-11 20:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: tangbin @ 2020-03-11 2:05 UTC (permalink / raw)
To: davem; +Cc: andrew, corbet, benh, netdev, linux-kernel, tangbin
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(-)
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;
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net:ftgmac100:remove redundant judgement
2020-03-11 2:05 [PATCH] net:ftgmac100:remove redundant judgement tangbin
@ 2020-03-11 20:38 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-11 20:38 UTC (permalink / raw)
To: tangbin; +Cc: andrew, corbet, benh, netdev, linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-11 20:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 2:05 [PATCH] net:ftgmac100:remove redundant judgement tangbin
2020-03-11 20:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).