LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Thomas, Sujith" <sujith.thomas@intel.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: <lenb@kernel.org>, <mingo@elte.hu>, <linux-acpi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-pm@lists.linux-foundation.org>,
	"Zhang, Rui" <rui.zhang@intel.com>
Subject: [patch 5/6] ACPI video: check for error in thermal_cooling_device_register call
Date: Fri, 15 Feb 2008 10:54:44 +0530	[thread overview]
Message-ID: <05B550FD4BD2014E841D83547B62600802AA650C@bgsmsx411.gar.corp.intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

From: Thomas Sujith <sujith.thomas@intel.com>

Need to check whetherthermal_cooling_device_register
returned ERROR or not.

Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
---

 drivers/acpi/video.c |    3 +++
 1 files changed, 3 insertions(+)

Index: linux-2.6.24/drivers/acpi/video.c
===================================================================
--- linux-2.6.24.orig/drivers/acpi/video.c
+++ linux-2.6.24/drivers/acpi/video.c
@@ -731,6 +731,9 @@ static void acpi_video_device_find_cap(s
 
 		device->cdev = thermal_cooling_device_register("LCD",
 					device->dev,
&video_cooling_ops);
+		if (IS_ERR(device->cdev))
+			return;
+
 		if (device->cdev) {
 			printk(KERN_INFO PREFIX
 				"%s is registered as
cooling_device%d\n",

[-- Attachment #2: [patch 5 of 6] ACPI video -  check for error in cooling_device_register --]
[-- Type: application/octet-stream, Size: 743 bytes --]

From: Thomas Sujith <sujith.thomas@intel.com>

Need to check whetherthermal_cooling_device_register
returned ERROR or not.

Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
---

 drivers/acpi/video.c |    3 +++
 1 files changed, 3 insertions(+)

Index: linux-2.6.24/drivers/acpi/video.c
===================================================================
--- linux-2.6.24.orig/drivers/acpi/video.c
+++ linux-2.6.24/drivers/acpi/video.c
@@ -731,6 +731,9 @@ static void acpi_video_device_find_cap(s
 
 		device->cdev = thermal_cooling_device_register("LCD",
 					device->dev, &video_cooling_ops);
+		if (IS_ERR(device->cdev))
+			return;
+
 		if (device->cdev) {
 			printk(KERN_INFO PREFIX
 				"%s is registered as cooling_device%d\n",

                 reply	other threads:[~2008-02-15  5:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=05B550FD4BD2014E841D83547B62600802AA650C@bgsmsx411.gar.corp.intel.com \
    --to=sujith.thomas@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    --cc=rui.zhang@intel.com \
    --subject='Re: [patch 5/6] ACPI video: check for error in thermal_cooling_device_register call' \
    /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

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).