summaryrefslogtreecommitdiff
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-02-28 20:31:49 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 23:47:35 +0100
commitbea3c377c286f4f63f67f2e061c1d8851af76b7e (patch)
treeb0d63c774230f3e71a2ff80f98fd186059f7e3c9 /drivers/acpi/utils.c
parentb2ca5dae31d61c4610ea3228f43f7cc66312897c (diff)
downloadlwn-bea3c377c286f4f63f67f2e061c1d8851af76b7e.tar.gz
lwn-bea3c377c286f4f63f67f2e061c1d8851af76b7e.zip
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 <colin.king@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c4
1 files changed, 0 insertions, 4 deletions
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: