diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-label.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index d51f45aa669e..f6e01a500d79 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c @@ -233,11 +233,7 @@ dsm_get_label(acpi_handle handle, int func, return -1; obj = (union acpi_object *)output->pointer; - - switch (obj->type) { - case ACPI_TYPE_PACKAGE: - if (obj->package.count != 2) - break; + if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 2) { len = obj->package.elements[0].integer.value; if (buf) { if (attribute == ACPI_ATTR_INDEX_SHOW) @@ -250,10 +246,10 @@ dsm_get_label(acpi_handle handle, int func, } kfree(output->pointer); return len; - break; - default: - kfree(output->pointer); } + + kfree(output->pointer); + return -1; } |