mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
The function devm_gpiod_get_optional() will return an error code encoded as a pointer type if the GPIO requested is not found. Therefore, we need to use the IS_ERR() macro to determine if the GPIO is valid, otherwise we could incorrectly attempt to dereference an invalid pointer. This bug was introduced when migrating the bluedroid driver to use the gpiod functions. Bug 4387902 Bug 4958861 Change-Id: Ib9e7494c92226454d93506c2c0d4c80bd6a7493c Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397231 (cherry picked from commit b461fa1a87f9beb5faa1dc917956603430b12df7) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405518 Reviewed-by: Brad Griffis <bgriffis@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
17 KiB
17 KiB