diff mbox

ACPI: remove a pointless NULL check

Message ID 20140130115656.GG12734@elgon.mountain (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Dan Carpenter Jan. 30, 2014, 11:56 a.m. UTC
"element" can't be NULL because it is the address of a struct member.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

Patch

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 492cf4f409fd..94dbbcb5827b 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -98,10 +98,6 @@  acpi_extract_package(union acpi_object *package,
 
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
-			return AE_BAD_DATA;
-		}
-
 		switch (element->type) {
 
 		case ACPI_TYPE_INTEGER: