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.
Unified · Split
| @@ -934,7 +934,9 @@ static int aspeed_pwm_tacho_probe(struct platform_device *pdev) · 933 unmodified lines | ||
| 934 | 934 | "missing or invalid reset controller device tree entry"); |
| 935 | 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 | 941 | ret = devm_add_action_or_reset(dev, aspeed_pwm_tacho_remove, priv); |
| 940 | 942 | if (ret) |