From: Colin Ian King Date: Sun, 28 Feb 2016 20:31:49 +0000 (+0000) Subject: ACPI / util: remove redundant check if element is NULL X-Git-Tag: MMI-PSA29.97-13-9~8221^2^3~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bea3c377c286f4f63f67f2e061c1d8851af76b7e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ACPI / util: remove redundant check if element is NULL element is &package->package.elements[i] which can never be NULL so the check to see if it is NULL is redundant and can be removed. Detected with static analysis by CoverityScan Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index f2f9873bb5c3..f12a72428aac 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -201,10 +201,6 @@ acpi_extract_package(union acpi_object *package, u8 **pointer = NULL; union acpi_object *element = &(package->package.elements[i]); - if (!element) { - return AE_BAD_DATA; - } - switch (element->type) { case ACPI_TYPE_INTEGER: