Bluetooth: hci_bcm: Handle possible error from acpi_dev_get_resources()
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Wed, 30 Sep 2015 13:26:42 +0000 (16:26 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 1 Oct 2015 08:03:37 +0000 (10:03 +0200)
Driver doesn't handle possible error from acpi_dev_get_resources(). Test it
and return the error code in case of error.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c

index 1a538ad..5375c9c 100644 (file)
@@ -705,7 +705,9 @@ static int bcm_acpi_probe(struct bcm_device *dev)
        if (!adev)
                return 0;
 
-       acpi_dev_get_resources(adev, &resources, bcm_resource, dev);
+       ret = acpi_dev_get_resources(adev, &resources, bcm_resource, dev);
+       if (ret < 0)
+               return ret;
        acpi_dev_free_resource_list(&resources);
 
        dmi_id = dmi_first_match(bcm_wrong_irq_dmi_table);