aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/namespace/nsnames.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c
index bd5773878009..9c587bdfe3f3 100644
--- a/drivers/acpi/namespace/nsnames.c
+++ b/drivers/acpi/namespace/nsnames.c
@@ -142,7 +142,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
142 142
143 size = acpi_ns_get_pathname_length(node); 143 size = acpi_ns_get_pathname_length(node);
144 if (!size) { 144 if (!size) {
145 return (NULL); 145 return_PTR(NULL);
146 } 146 }
147 147
148 /* Allocate a buffer to be returned to caller */ 148 /* Allocate a buffer to be returned to caller */
@@ -157,7 +157,8 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
157 157
158 status = acpi_ns_build_external_path(node, size, name_buffer); 158 status = acpi_ns_build_external_path(node, size, name_buffer);
159 if (ACPI_FAILURE(status)) { 159 if (ACPI_FAILURE(status)) {
160 return (NULL); 160 ACPI_FREE(name_buffer);
161 return_PTR(NULL);
161 } 162 }
162 163
163 return_PTR(name_buffer); 164 return_PTR(name_buffer);