Re: [PATCH v1 3/3] watchdog: Add Watchdog Timer driver for RZ/G2L

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

 



On 11/11/21 2:35 AM, Biju Das wrote:
[ ... [
+
+	ret = devm_add_action_or_reset(&pdev->dev,
+				       rzg2l_wdt_reset_assert_pm_disable_put,
+				       &priv->wdev);
+	if (ret < 0)
+		goto out_reset;

_or_reset implies that the action is taken on failure, so there is not
need to do it again.

As per [1], it can return -ENOMEM, in that case I don't get action callback. On a safer side
I will move this call after watchdog_set_drvdata()

[1] https://elixir.bootlin.com/linux/latest/source/drivers/base/devres.c#L734


That points to devm_add_action(), not to devm_add_action_or_reset().

Guenter



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux