@@ -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);
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@pengutronix.de> --- drivers/ata/ahci_mtk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)