Skip to contentSkip to conversation

ACPI: Fix &&/|| confusion in acpi_evaluate_string() (in comment)

PATCH New Roel Kluin 1 participant 1 message Dec 31, 2009 ACPI

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 ACPI: Fix &&/|| confusion in acpi_evaluate_string() (in comment)

This always evaluates to true.

---
 drivers/acpi/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

It's between an #if 0 ... #endif.

drivers/acpi/utils.c +1 -1
index 811fec1..3495b43 100644
@@ -312,7 +312,7 @@ acpi_evaluate_string(acpi_handle handle,
 	element = (acpi_object *) buffer.pointer;
 
 	if ((element->type != ACPI_TYPE_STRING)
-	    || (element->type != ACPI_TYPE_BUFFER)
+	    && (element->type != ACPI_TYPE_BUFFER)
 	    || !element->string.length) {
 		acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
 		return AE_BAD_DATA;