linux-stable/drivers/bluetooth
Bartosz Golaszewski 3d05fc8223 Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional()
Any return value from gpiod_get_optional() other than a pointer to a
GPIO descriptor or a NULL-pointer is an error and the driver should
abort probing. That being said: commit 56d074d26c ("Bluetooth: hci_qca:
don't use IS_ERR_OR_NULL() with gpiod_get_optional()") no longer sets
power_ctrl_enabled on NULL-pointer returned by
devm_gpiod_get_optional(). Restore this behavior but bail-out on errors.
While at it: also bail-out on error returned when trying to get the
"swctrl" GPIO.

Reported-by: Wren Turkal <wt@penguintechs.org>
Reported-by: Zijun Hu <quic_zijuhu@quicinc.com>
Closes: https://lore.kernel.org/linux-bluetooth/1713449192-25926-2-git-send-email-quic_zijuhu@quicinc.com/
Fixes: 56d074d26c ("Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional()")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Wren Turkal" <wt@penguintechs.org>
Reported-by: Wren Turkal <wt@penguintechs.org>
Reported-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Krzysztof Kozlowski<krzysztof.kozlowski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2024-04-24 16:26:22 -04:00
..
ath3k.c
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c Bluetooth: btbcm: Use devm_kstrdup() 2024-03-06 17:24:06 -05:00
btbcm.h
btintel.c Bluetooth: btintel: Fixe build regression 2024-03-06 17:26:10 -05:00
btintel.h Bluetooth: btintel: Print firmware SHA1 2023-12-22 12:55:56 -05:00
btmrvl_debugfs.c
btmrvl_drv.h
btmrvl_main.c
btmrvl_sdio.c Bluetooth: btmrvl_sdio: mark OF related data as maybe unused 2023-04-23 21:49:18 -07:00
btmrvl_sdio.h
btmtk.c Bluetooth: btusb: mediatek: Fix double free of skb in coredump 2024-04-24 16:26:16 -04:00
btmtk.h Bluetooth: btmtk: Add MODULE_FIRMWARE() for MT7922 2024-03-06 17:27:11 -05:00
btmtksdio.c Bluetooth: btmtksdio: enable bluetooth wakeup in system suspend 2023-10-23 11:04:51 -07:00
btmtkuart.c treewide, serdev: change receive_buf() return type to size_t 2024-01-27 18:13:53 -08:00
btnxpuart.c TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
btqca.c Bluetooth: qca: fix invalid device address check 2024-04-24 16:26:13 -04:00
btqca.h Bluetooth: qca: add support for QCA2066 2023-10-23 10:59:46 -07:00
btqcomsmd.c Bluetooth: btqcomsmd: Fix command timeout after setting BD address 2023-03-23 13:09:38 -07:00
btrsi.c
btrtl.c Bluetooth: btrtl: Add the support for RTL8852BT/RTL8852BE-VT 2024-03-06 17:22:36 -05:00
btrtl.h Bluetooth: btrtl: Add Realtek devcoredump support 2023-08-11 11:35:14 -07:00
btsdio.c Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work" 2023-04-23 22:04:52 -07:00
btusb.c Bluetooth: btusb: Fix triggering coredump implementation for QCA 2024-04-24 16:26:10 -04:00
dtl1_cs.c
h4_recv.h
hci_ag6xx.c
hci_ath.c
hci_bcm.c Bluetooth: hci_bcm: do not mark valid bd_addr as invalid 2023-06-29 10:52:08 -07:00
hci_bcm4377.c Bluetooth: hci_bcm4377: do not mark valid bd_addr as invalid 2024-02-28 09:39:44 -05:00
hci_bcsp.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
hci_h4.c
hci_h5.c Bluetooth: btrtl: fix out of bounds memory access 2024-03-06 17:26:21 -05:00
hci_intel.c
hci_ldisc.c TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
hci_ll.c Bluetooth: hci_ll: drop of_match_ptr for ID table 2023-04-23 21:49:03 -07:00
hci_mrvl.c Bluetooth: hci_mrvl: Add serdev support for 88W8997 2023-04-23 21:45:29 -07:00
hci_nokia.c Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() 2023-08-11 11:50:41 -07:00
hci_qca.c Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional() 2024-04-24 16:26:22 -04:00
hci_serdev.c TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
hci_uart.h Bluetooth: hci_h5: Add ability to allocate memory for private data 2024-03-06 17:26:21 -05:00
hci_vhci.c Bluetooth: Fix deadlock in vhci_send_frame 2023-12-15 11:29:16 -05:00
Kconfig Bluetooth: Add vhci devcoredump support 2023-04-23 21:58:21 -07:00
Makefile Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets 2023-04-23 21:51:55 -07:00
virtio_bt.c virtio_bt: call scheduler when we free unused buffs 2023-07-03 12:15:12 -04:00