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

Commit fad06016 authored by Markus Elfring's avatar Markus Elfring Committed by Tejun Heo
Browse files

sata_mv: Delete unnecessary checks before the function call "phy_power_off"



The phy_power_off() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 214f1aff
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4185,7 +4185,6 @@ static int mv_platform_probe(struct platform_device *pdev)
			clk_disable_unprepare(hpriv->port_clks[port]);
			clk_put(hpriv->port_clks[port]);
		}
		if (hpriv->port_phys[port])
		phy_power_off(hpriv->port_phys[port]);
	}

@@ -4216,7 +4215,6 @@ static int mv_platform_remove(struct platform_device *pdev)
			clk_disable_unprepare(hpriv->port_clks[port]);
			clk_put(hpriv->port_clks[port]);
		}
		if (hpriv->port_phys[port])
		phy_power_off(hpriv->port_phys[port]);
	}
	return 0;