diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-03 10:21:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-03 10:21:35 -0500 |
commit | d033a236bdda9f20417c66ea08bc185d9be29952 (patch) | |
tree | af2fd522bbc6d9d22f7d34de40fdd1efeca5473c | |
parent | 72bca2084a21edda74b802bc076083d5951f67b4 (diff) | |
parent | 4282fc47c01262fdda55a9d63a4e25173fd9afb4 (diff) | |
download | linux-d033a236bdda9f20417c66ea08bc185d9be29952.tar.bz2 |
Merge branch 'net-Renesas-kill-redundant-checks'
Sergei Shtylyov says:
====================
Kill redundant checks in the Renesas Ethernet drivers
Here's a set of 2 patches against DaveM's 'net-next.git' repo removing
redundant checks in the driver probe() methods.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/renesas/ravb_main.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 009780df664b..c87f57ca4437 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2205,8 +2205,7 @@ out_dma_free: if (chip_id != RCAR_GEN2) ravb_ptp_stop(ndev); out_release: - if (ndev) - free_netdev(ndev); + free_netdev(ndev); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 75323000c364..d47bbbb22e7c 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -3282,8 +3282,7 @@ out_napi_del: out_release: /* net_dev free */ - if (ndev) - free_netdev(ndev); + free_netdev(ndev); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); |