提交 4282fc47 编写于 作者: S Sergei Shtylyov 提交者: David S. Miller

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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5d0c100c
......@@ -3282,8 +3282,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
out_release:
/* net_dev free */
if (ndev)
free_netdev(ndev);
free_netdev(ndev);
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册