From 4282fc47c01262fdda55a9d63a4e25173fd9afb4 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sun, 31 Dec 2017 21:41:36 +0300 Subject: sh_eth: 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 Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller --- drivers/net/ethernet/renesas/sh_eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/net/ethernet/renesas') 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); -- cgit v1.2.3