diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-02-08 19:40:17 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-27 01:16:53 +0300 |
commit | d8c7785e8104359f139cdfa99e2511575c4d4823 (patch) | |
tree | 03e473caa3e6cd0dcf9c11fd6e94b2cdc3768d00 /net | |
parent | 81526f2920bf8a03b670dbc2d45f35f204344d55 (diff) | |
download | linux-d8c7785e8104359f139cdfa99e2511575c4d4823.tar.xz |
Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional()
[ Upstream commit 56d074d26c5828773b00b2185dd7e1d08273b8e8 ]
The optional variants for the gpiod_get() family of functions return NULL
if the GPIO in question is not associated with this device. They return
ERR_PTR() on any other error. NULL descriptors are graciously handled by
GPIOLIB and can be safely passed to any of the GPIO consumer interfaces
as they will return 0 and act as if the function succeeded. If one is
using the optional variant, then there's no point in checking for NULL.
Fixes: 6845667146a2 ("Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions