projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2ca5da
)
ACPI / util: remove redundant check if element is NULL
author
Colin Ian King
<colin.king@canonical.com>
Sun, 28 Feb 2016 20:31:49 +0000
(20:31 +0000)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 22:47:35 +0000
(23:47 +0100)
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>
drivers/acpi/utils.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/acpi/utils.c
b/drivers/acpi/utils.c
index f2f9873bb5c363699b49459ebc2fcc9a00af0776..f12a72428aacc76eef7a24845fe847ff55919e94 100644
(file)
--- 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: