Skip to content

Commit

Permalink
sata_mv: Delete unnecessary checks before the function call "phy_powe…
Browse files Browse the repository at this point in the history
…r_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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Markus Elfring authored and Tejun Heo committed Feb 3, 2015
1 parent 214f1af commit fad0601
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4185,8 +4185,7 @@ 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]);
phy_power_off(hpriv->port_phys[port]);
}

return rc;
Expand Down Expand Up @@ -4216,8 +4215,7 @@ 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]);
phy_power_off(hpriv->port_phys[port]);
}
return 0;
}
Expand Down

0 comments on commit fad0601

Please sign in to comment.