aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2015-01-15 09:09:35 -0500
committerTejun Heo <tj@kernel.org>2015-01-19 09:53:25 -0500
commit6033798121e154005cd537c192729025c9da8901 (patch)
tree7b61b96b271f33905159fc70ac85cf4ee14567e4
parent5bc27ef72719acb1cf745f16ce5583b57ea660aa (diff)
ata: libahci: Clean-up the ahci_platform_en/disable_phys functions
The phy_ functions handle the NULL pointer case, so there is no need to skip them if there is a NULL pointer. Moreover, after the error label there is already no check on the pointer. This patch removes the unnecessary tests and brings some consistency. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--drivers/ata/libahci_platform.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 0b03f9056692..a147aaadca85 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -54,9 +54,6 @@ static int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
54 int rc, i; 54 int rc, i;
55 55
56 for (i = 0; i < hpriv->nports; i++) { 56 for (i = 0; i < hpriv->nports; i++) {
57 if (!hpriv->phys[i])
58 continue;
59
60 rc = phy_init(hpriv->phys[i]); 57 rc = phy_init(hpriv->phys[i]);
61 if (rc) 58 if (rc)
62 goto disable_phys; 59 goto disable_phys;
@@ -89,9 +86,6 @@ static void ahci_platform_disable_phys(struct ahci_host_priv *hpriv)
89 int i; 86 int i;
90 87
91 for (i = 0; i < hpriv->nports; i++) { 88 for (i = 0; i < hpriv->nports; i++) {
92 if (!hpriv->phys[i])
93 continue;
94
95 phy_power_off(hpriv->phys[i]); 89 phy_power_off(hpriv->phys[i]);
96 phy_exit(hpriv->phys[i]); 90 phy_exit(hpriv->phys[i]);
97 } 91 }