linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Hongbo Zhang <hongbo.zhang@stericsson.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Francesco Lavra <francescolavra.fl@gmail.com>,
	linux-pm@vger.kernel.org
Subject: [PATCH 1/2] thermal: db8500: Fix checking return value of thermal_zone_device_register
Date: Tue, 12 Mar 2013 23:42:20 +0800	[thread overview]
Message-ID: <1363102940.3160.2.camel@phoenix> (raw)

thermal_zone_device_register() returns ERR_PTR on error, thus use
IS_ERR rather than IS_ERR_OR_NULL to check return value.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/thermal/db8500_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index 61ce60a..6bdcec4 100644
--- a/drivers/thermal/db8500_thermal.c
+++ b/drivers/thermal/db8500_thermal.c
@@ -447,7 +447,7 @@ static int db8500_thermal_probe(struct platform_device *pdev)
 	pzone->therm_dev = thermal_zone_device_register("db8500_thermal_zone",
 		ptrips->num_trips, 0, pzone, &thdev_ops, NULL, 0, 0);
 
-	if (IS_ERR_OR_NULL(pzone->therm_dev)) {
+	if (IS_ERR(pzone->therm_dev)) {
 		dev_err(&pdev->dev, "Register thermal zone device failed.\n");
 		return PTR_ERR(pzone->therm_dev);
 	}
-- 
1.7.9.5




             reply	other threads:[~2013-03-12 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 15:42 Axel Lin [this message]
2013-03-12 15:43 ` [PATCH 2/2] thermal: db8500: Fix missing mutex_unlock() in probe error paths Axel Lin
2013-03-13  8:13   ` Hongbo Zhang
2013-03-13  8:17     ` Axel Lin
2013-03-25  8:09   ` Zhang Rui
2013-03-25  8:09 ` [PATCH 1/2] thermal: db8500: Fix checking return value of thermal_zone_device_register Zhang Rui

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=1363102940.3160.2.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=francescolavra.fl@gmail.com \
    --cc=hongbo.zhang@stericsson.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).