Re: [PATCH] Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe

From: Marcel Holtmann
Date: Thu Jan 06 2022 - 08:54:46 EST


Hi Miaoqian,

> 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: 77131dfe ("Bluetooth: hci_qca: Replace devm_gpiod_get() with devm_gpiod_get_optional()")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
> ---
> drivers/bluetooth/hci_qca.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel