patch-2.4.0-prerelease linux/drivers/acpi/namespace/nsnames.c

Next file: linux/drivers/acpi/namespace/nsobject.c
Previous file: linux/drivers/acpi/namespace/nsload.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test12/linux/drivers/acpi/namespace/nsnames.c linux/drivers/acpi/namespace/nsnames.c
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsnames - Name manipulation and search
- *              $Revision: 48 $
+ *              $Revision: 51 $
  *
  ******************************************************************************/
 
@@ -86,7 +86,7 @@
 
 	name_buffer = acpi_cm_callocate (size + 1);
 	if (!name_buffer) {
-		REPORT_ERROR ("Ns_get_table_pathname: allocation failure");
+		REPORT_ERROR (("Ns_get_table_pathname: allocation failure\n"));
 		return (NULL);
 	}
 
@@ -168,6 +168,12 @@
 		  next_node = acpi_ns_get_parent_object (next_node))
 	{
 		size += PATH_SEGMENT_LENGTH;
+	}
+
+	/* Special case for size still 0 - no parent for "special" nodes */
+
+	if (!size) {
+		size = PATH_SEGMENT_LENGTH;
 	}
 
 	/* Set return length to the required path length */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)