[PATCH] ata: mediatek: fix optional reset handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As of commit bb475230b8e5 ("reset: make optional functions really
optional"), the reset framework API calls use NULL pointers to describe
optional, non-present reset controls.

This allows to unconditionally return errors from
devm_reset_control_get_optional_exclusive.

Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
 drivers/ata/ahci_mtk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/ahci_mtk.c b/drivers/ata/ahci_mtk.c
index d9b08ae7c3b2..7b705302308e 100644
--- a/drivers/ata/ahci_mtk.c
+++ b/drivers/ata/ahci_mtk.c
@@ -49,15 +49,15 @@ static int mtk_ahci_platform_resets(struct ahci_host_priv *hpriv,
 
 	/* reset AXI bus and PHY part */
 	plat->axi_rst = devm_reset_control_get_optional_exclusive(dev, "axi");
-	if (PTR_ERR(plat->axi_rst) == -EPROBE_DEFER)
+	if (IS_ERR(plat->axi_rst))
 		return PTR_ERR(plat->axi_rst);
 
 	plat->sw_rst = devm_reset_control_get_optional_exclusive(dev, "sw");
-	if (PTR_ERR(plat->sw_rst) == -EPROBE_DEFER)
+	if (IS_ERR(plat->sw_rst))
 		return PTR_ERR(plat->sw_rst);
 
 	plat->reg_rst = devm_reset_control_get_optional_exclusive(dev, "reg");
-	if (PTR_ERR(plat->reg_rst) == -EPROBE_DEFER)
+	if (IS_ERR(plat->reg_rst))
 		return PTR_ERR(plat->reg_rst);
 
 	err = reset_control_assert(plat->axi_rst);
-- 
2.29.2




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux