Hi Yuri,
sorry for the late reply.
On 23.08.26 20:04, Yuri Zaporozhets wrote:
> +static int wdt_pre_remove(struct udevice *dev)
> +{
> + struct wdt_priv *priv = dev_get_uclass_priv(dev);
> +
> + if (!IS_ENABLED(CONFIG_WATCHDOG) || !priv || !priv->running)
> + return 0;
> +
> + cyclic_unregister(&priv->cyclic);
> + priv->running = false;
> +
> + return 0;
> +}
Good catch. This is not limited to out-of-tree drivers btw,
octeontx_wdt has DM_FLAG_OS_PREPARE and its remove() calls the
driver stop directly, so it leaves the same dangling cyclic behind.
Nit: priv can't be NULL here, it's per_device_auto. And since commit
2dbd9101b991 ("cyclic: make cyclic_unregister() idempotent")
cyclic_unregister() is fine on a cyclic that was never registered.
Not worth a respin though.
One thing: the patch comes from [email protected], but the SoB
is [email protected], so checkpatch complains about the mismatch. Which
one do you want as author? I can fix that up while applying.
Reviewed-by: Stefan Roese <[email protected]>
Thanks,
Stefan