Message ID | 1456691509-7855-1-git-send-email-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Rafael Wysocki |
Headers | show |
On Sunday, February 28, 2016 08:31:49 PM Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > 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 <colin.king@canonical.com> Applied, thanks! Rafael -- 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 --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index f2f9873..f12a724 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: