Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d0c100c authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller
Browse files

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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 72bca208
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2205,7 +2205,6 @@ static int ravb_probe(struct platform_device *pdev)
	if (chip_id != RCAR_GEN2)
		ravb_ptp_stop(ndev);
out_release:
	if (ndev)
	free_netdev(ndev);

	pm_runtime_put(&pdev->dev);