[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200430121532.22768-1-tangbin@cmss.chinamobile.com>
Date: Thu, 30 Apr 2020 20:15:31 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Tang Bin <tangbin@...s.chinamobile.com>,
Zhang Shengju <zhangshengju@...s.chinamobile.com>
Subject: [PATCH] net/faraday: Fix unnecessary check in ftmac100_probe()
The function ftmac100_probe() is only called with an openfirmware
platform device. Therefore there is no need to check that the passed
in device is NULL.
Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
---
drivers/net/ethernet/faraday/ftmac100.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 6c247cbbd..2be173b03 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -1059,9 +1059,6 @@ static int ftmac100_probe(struct platform_device *pdev)
struct ftmac100 *priv;
int err;
- if (!pdev)
- return -ENODEV;
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
--
2.20.1.windows.1
Powered by blists - more mailing lists