+ acpi-scan-handle-kset-kobject-errors.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     acpi/scan: handle kset/kobject errors

has been added to the -mm tree.  Its filename is

     acpi-scan-handle-kset-kobject-errors.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: acpi/scan: handle kset/kobject errors
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

Check and handle kset_register() and kobject_register() init errors.

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/acpi/scan.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff -puN drivers/acpi/scan.c~acpi-scan-handle-kset-kobject-errors drivers/acpi/scan.c
--- a/drivers/acpi/scan.c~acpi-scan-handle-kset-kobject-errors
+++ a/drivers/acpi/scan.c
@@ -4,6 +4,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/acpi.h>
 
 #include <acpi/acpi_drivers.h>
@@ -113,6 +114,8 @@ static struct kset acpi_namespace_kset =
 static void acpi_device_register(struct acpi_device *device,
 				 struct acpi_device *parent)
 {
+	int err;
+
 	/*
 	 * Linkage
 	 * -------
@@ -138,7 +141,10 @@ static void acpi_device_register(struct 
 		device->kobj.parent = &parent->kobj;
 	device->kobj.ktype = &ktype_acpi_ns;
 	device->kobj.kset = &acpi_namespace_kset;
-	kobject_register(&device->kobj);
+	err = kobject_register(&device->kobj);
+	if (err < 0)
+		printk(KERN_WARNING "%s: kobject_register error: %d\n",
+			__FUNCTION__, err);
 	create_sysfs_device_files(device);
 }
 
@@ -1450,7 +1456,9 @@ static int __init acpi_scan_init(void)
 	if (acpi_disabled)
 		return 0;
 
-	kset_register(&acpi_namespace_kset);
+	result = kset_register(&acpi_namespace_kset);
+	if (result < 0)
+		printk(KERN_ERR PREFIX "kset_register error: %d\n", result);
 
 	result = bus_register(&acpi_bus_type);
 	if (result) {
_

Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxx are

acpi-bus-add-missing-newline.patch
acpi-handle-firmware_register-init-errors.patch
acpi-scan-handle-kset-kobject-errors.patch
fix-undefined-missing-references-in-isa-miro-sound-driver.patch
sysfs_remove_bin_file-no-return-value-dump_stack-on.patch
kobject-must_check-fixes.patch
drivers-base-check-errors.patch
sysfs-add-proper-sysfs_init-prototype.patch
bttv-must_check-fixes.patch
input-must_check-fixes.patch
pcmcia-ds-must_check-fixes.patch
pcie-check-and-return-bus_register-errors.patch
pcie-check-and-return-bus_register-errors-fix.patch
pcie-cleanup-on-probe-error.patch
aic7-cleanup-module_parm_desc-strings.patch
dc395x-fix-printk-format-warning.patch
scsi_debug-must_check-fixes.patch
areca-raid-linux-scsi-driver.patch
consistently-use-max_errno-in-__syscall_return.patch
consistently-use-max_errno-in-__syscall_return-fix.patch
eisa-bus-modalias-attributes-support-1.patch
kernel-params-must_check-fixes.patch
blockdevc-check-errors.patch
block-handle-subsystem_register-init-errors.patch
fs-namespace-handle-init-registration-errors.patch
ide-core-must_check-fixes.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux