]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe
authorMiaoqian Lin <linmq006@gmail.com>
Fri, 24 Dec 2021 08:02:49 +0000 (08:02 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 6 Jan 2022 13:53:57 +0000 (14:53 +0100)
commit686b67791340a9364021a0669e9736e475dd4bef
treef260db2b1f321349afaf40f013d457f7fcbd752f
parenta8d27c4d818408ebbd34fa4988aab3ce20add39a
Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe

The function devm_gpiod_get_index() return error pointers on error.
Thus devm_gpiod_get_index_optional() could return NULL and error pointers.
The same as devm_gpiod_get_optional() function. Using IS_ERR_OR_NULL()
check to catch error pointers.

Fixes: a9a483f2 ("Bluetooth: hci_qca: Replace devm_gpiod_get() with devm_gpiod_get_optional()")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c