diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-12-31 21:41:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-03 10:21:35 -0500 |
commit | 5d0c100c228b51ce2c14bdbc845ca446e0494689 (patch) | |
tree | 23a90565862864773f59254f98068b2df5e8f99e /drivers/net/ethernet/renesas | |
parent | 72bca2084a21edda74b802bc076083d5951f67b4 (diff) | |
download | linux-5d0c100c228b51ce2c14bdbc845ca446e0494689.tar.bz2 |
ravb: kill redundant check in the probe() method
Browsing thru the driver disassembly, I noticed that gcc was able to
figure out that the 'ndev' pointer is always non-NULL when calling
free_netdev() on the probe() method's error path and thus skip that
redundant NULL check... gcc is smart, be like gcc! :-)
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r-- | drivers/net/ethernet/renesas/ravb_main.c | 3 |
1 files changed, 1 insertions, 2 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); |