Skip to content

Commit

Permalink
ftgmac100: Remove redundant judgement
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
tangbin authored and David S. Miller committed Mar 11, 2020
1 parent 96ee187 commit 86eeb97
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ethernet/faraday/ftgmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,9 +1755,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;
Expand Down

0 comments on commit 86eeb97

Please sign in to comment.