From: Jarkko Nikula Date: Wed, 30 Sep 2015 13:26:42 +0000 (+0300) Subject: Bluetooth: hci_bcm: Handle possible error from acpi_dev_get_resources() X-Git-Tag: firefly_0821_release~176^2~818^2~173^2~31 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5be00284dc85dadd5241833fbca645c19baebebb;p=firefly-linux-kernel-4.4.55.git Bluetooth: hci_bcm: Handle possible error from acpi_dev_get_resources() 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 Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 1a538ad6bf2b..5375c9c04fda 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -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);