All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tian Tao <tiantao6@hisilicon.com>
To: <sre@kernel.org>, <hdegoede@redhat.com>, <wens@csie.org>
Cc: <linux-pm@vger.kernel.org>
Subject: [PATCH] power: supply: axp288_charger: switch to using devm_add_action_or_reset()
Date: Wed, 16 Dec 2020 14:09:38 +0800	[thread overview]
Message-ID: <1608098978-53068-1-git-send-email-tiantao6@hisilicon.com> (raw)

switch to using devm_add_action_or_reset() instead of devm_add_action.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/power/supply/axp288_charger.c | 2 +-
 kernel/dma/map_benchmark.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
index a4df1ea..6480c2e 100644
--- a/drivers/power/supply/axp288_charger.c
+++ b/drivers/power/supply/axp288_charger.c
@@ -855,7 +855,7 @@ static int axp288_charger_probe(struct platform_device *pdev)
 	}
 
 	/* Cancel our work on cleanup, register this before the notifiers */
-	ret = devm_add_action(dev, axp288_charger_cancel_work, info);
+	ret = devm_add_action_or_reset(dev, axp288_charger_cancel_work, info);
 	if (ret)
 		return ret;
 
diff --git a/kernel/dma/map_benchmark.c b/kernel/dma/map_benchmark.c
index 19f6616..775191d 100644
--- a/kernel/dma/map_benchmark.c
+++ b/kernel/dma/map_benchmark.c
@@ -294,7 +294,7 @@ static int __map_benchmark_probe(struct device *dev)
 		return -ENOMEM;
 	map->dev = dev;
 
-	ret = devm_add_action(dev, map_benchmark_remove_debugfs, map);
+	ret = devm_add_action_or_reset(dev, map_benchmark_remove_debugfs, map);
 	if (ret) {
 		pr_err("Can't add debugfs remove action\n");
 		return ret;
-- 
2.7.4


             reply	other threads:[~2020-12-16  6:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  6:09 Tian Tao [this message]
2020-12-16  9:35 ` [PATCH] power: supply: axp288_charger: switch to using devm_add_action_or_reset() Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1608098978-53068-1-git-send-email-tiantao6@hisilicon.com \
    --to=tiantao6@hisilicon.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.