]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
Bluetooth: hci_bcm: For serdev case close serdev on failure to set power
authorHans de Goede <hdegoede@redhat.com>
Mon, 22 Jan 2018 11:53:24 +0000 (12:53 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 22 Jan 2018 12:01:42 +0000 (13:01 +0100)
commit8c6b8eda7294775097e0d0eb64cb6f86d460d7c2
treea81a05ed752780b471e4816cfe3758fefeaf0127
parentd456f678a074b5d7cf14c4043f9294edadc2aef8
Bluetooth: hci_bcm: For serdev case close serdev on failure to set power

Commit 8bfa7e1e03ac ("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 <lukas@wunner.de>
Fixes: 8bfa7e1e03ac ("Bluetooth: hci_bcm: Handle errors properly")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c