Bluetooth: hci_bcm: Fix unwanted error reporting if no bcm dev
authorLoic Poulain <loic.poulain@intel.com>
Tue, 27 Jun 2017 17:15:07 +0000 (19:15 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 27 Jun 2017 17:28:11 +0000 (19:28 +0200)
The hci_bcm proto is able to operate without bcm platform device linked
to its uart port. In that case, firmware can be applied, but there is
no power operation (no gpio/irq resources mgmt).

However, the current implementation breaks this use case because of
reporting a ENODEV error in the bcm setup procedure if bcm_request_irq
fails (which is the case if no bcm device linked).

Fix this by removing bcm_request_irq error forwarding.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Reported-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c

index d2e9e2d..192ad27 100644 (file)
@@ -419,8 +419,7 @@ finalize:
        if (err)
                return err;
 
-       err = bcm_request_irq(bcm);
-       if (!err)
+       if (!bcm_request_irq(bcm))
                err = bcm_setup_sleep(hu);
 
        return err;