Message ID | 20200430121532.22768-1-tangbin@cmss.chinamobile.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | net/faraday: Fix unnecessary check in ftmac100_probe() | expand |
From: Tang Bin <tangbin@cmss.chinamobile.com> Date: Thu, 30 Apr 2020 20:15:31 +0800 > 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@cmss.chinamobile.com> > Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Applied.
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;