mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Bluetooth: hci_bcm: For serdev case close serdev on failure to set power
Commit8bfa7e1e03("Bluetooth: hci_bcm: Handle errors properly") introduced error checking for the bcm_gpio_set_power() call in bcm_open() but the error-path it introduces unsets dev->hu, which is correct for platform_device instantiated bcm_dev-s but not for serdev instantiated devs. For serdev instantiated devs serdev_device_close() should be called instead (and dev->hu should be left set). Cc: Lukas Wunner <[email protected]> Fixes:8bfa7e1e03("Bluetooth: hci_bcm: Handle errors properly") Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
d456f678a0
commit
8c6b8eda72
1 changed files with 4 additions and 1 deletions
|
|
@ -412,8 +412,11 @@ out:
|
|||
return 0;
|
||||
|
||||
err_unset_hu:
|
||||
if (hu->serdev)
|
||||
serdev_device_close(hu->serdev);
|
||||
#ifdef CONFIG_PM
|
||||
bcm->dev->hu = NULL;
|
||||
else
|
||||
bcm->dev->hu = NULL;
|
||||
#endif
|
||||
err_free:
|
||||
mutex_unlock(&bcm_device_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue