Skip to content

Commit

Permalink
net/faraday: Fix unnecessary check in ftmac100_probe()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tang Bin authored and David S. Miller committed Apr 30, 2020
1 parent 51070a3 commit 1569a3c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ethernet/faraday/ftmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,9 +1057,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;
Expand Down

0 comments on commit 1569a3c

Please sign in to comment.