Skip to content

Commit

Permalink
Bluetooth: hci_bcm: Do not test ACPI companion in bcm_acpi_probe()
Browse files Browse the repository at this point in the history
This device has always ACPI companion because driver supports only ACPI
enumeration. Therefore there is no need to test it in bcm_acpi_probe() and
we can pass it directly to acpi_dev_get_resources() (which will return
-EINVAL in case of NULL argument is passed).

Signed-off-by: Jarkko Nikula <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
jhnikula authored and holtmann committed Oct 1, 2015
1 parent 4d1c455 commit e98d6d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/bluetooth/hci_bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ static int bcm_resource(struct acpi_resource *ares, void *data)
static int bcm_acpi_probe(struct bcm_device *dev)
{
struct platform_device *pdev = dev->pdev;
struct acpi_device *adev;
LIST_HEAD(resources);
const struct dmi_system_id *dmi_id;
int ret;
Expand Down Expand Up @@ -696,11 +695,8 @@ static int bcm_acpi_probe(struct bcm_device *dev)
}

/* Retrieve UART ACPI info */
adev = ACPI_COMPANION(&dev->pdev->dev);
if (!adev)
return 0;

ret = acpi_dev_get_resources(adev, &resources, bcm_resource, dev);
ret = acpi_dev_get_resources(ACPI_COMPANION(&dev->pdev->dev),
&resources, bcm_resource, dev);
if (ret < 0)
return ret;
acpi_dev_free_resource_list(&resources);
Expand Down

0 comments on commit e98d6d6

Please sign in to comment.