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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux