OSDN Git Service

ACPI / utils: remove a pointless NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 30 Jan 2014 11:56:56 +0000 (14:56 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 5 Feb 2014 00:05:24 +0000 (01:05 +0100)
"element" can't be NULL because it is the address of a struct member.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/utils.c

index 0347a37..85e3b61 100644 (file)
@@ -99,10 +99,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: