History

hwmon: (aspeed-pwm-tacho) Propagate reset deassert errors

aspeed_pwm_tacho_probe() installs its reset cleanup action and configures the controller after an unchecked reset deassertion. Stop probing when the reset controller rejects the transition, before the hwmon device becomes visible.

Pengpeng Hou committed 2 months ago

Commit 09a9e171 parent bb2424c1 file · +3 −1Browse files

Unified · Split

drivers/hwmon/aspeed-pwm-tacho.c+3−1
@@ -934,7 +934,9 @@ static int aspeed_pwm_tacho_probe(struct platform_device *pdev) · 933 unmodified lines
934 "missing or invalid reset controller device tree entry");934 "missing or invalid reset controller device tree entry");
935 return PTR_ERR(priv->rst);935 return PTR_ERR(priv->rst);
936 }936 }
937 reset_control_deassert(priv->rst);937 ret = reset_control_deassert(priv->rst);
938 if (ret)
939 return ret;
938 940
939 ret = devm_add_action_or_reset(dev, aspeed_pwm_tacho_remove, priv);941 ret = devm_add_action_or_reset(dev, aspeed_pwm_tacho_remove, priv);
940 if (ret)942 if (ret)