aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-06-15 15:40:39 -0400
committerLen Brown <len.brown@intel.com>2006-06-15 15:40:39 -0400
commit36a557d1f48669c57f59e37d9334400a29e4e53c (patch)
tree6d97b3eb9fefa6a82dd11dd7caeb799f986bdc48 /drivers
parent4e8f10b7ccf1c3c53a818a157962074a7340732e (diff)
parent6665bda76461308868bd1e52caf627f4cb29ed32 (diff)
Pull trivial into release branch
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/hotkey.c2
-rw-r--r--drivers/acpi/thermal.c4
-rw-r--r--drivers/acpi/video.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index 2e2e4051dfa..c25b2b92edc 100644
--- a/drivers/acpi/hotkey.c
+++ b/drivers/acpi/hotkey.c
@@ -723,6 +723,8 @@ get_parms(char *config_record,
goto do_fail;
count = tmp1 - tmp;
*action_handle = (char *)kmalloc(count + 1, GFP_KERNEL);
+ if (!*action_handle)
+ goto do_fail;
strncpy(*action_handle, tmp, count);
*(*action_handle + count) = 0;
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index fba9c230a84..a29af58cb4c 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -941,8 +941,10 @@ acpi_thermal_write_trip_points(struct file *file,
memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN);
active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL);
- if (!active)
+ if (!active) {
+ kfree(limit_string);
return_VALUE(-ENOMEM);
+ }
if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index bd488751837..724149d72d9 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -323,7 +323,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device,
if (!ACPI_SUCCESS(status))
return_VALUE(status);
obj = (union acpi_object *)buffer.pointer;
- if (!obj && (obj->type != ACPI_TYPE_PACKAGE)) {
+ if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n"));
status = -EFAULT;
goto err;