summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDmitry Osipenko2019-07-05 17:11:39 +0200
committerThierry Reding2019-07-25 15:23:26 +0200
commit2a6fc3cb5cb68597f1072bfeef28d2ca02310220 (patch)
tree0f42849c0062f4b5c649dafc65a44ae90cf9340c /drivers/gpu
parentLinus 5.3-rc1 (diff)
downloadkernel-qcow2-linux-2a6fc3cb5cb68597f1072bfeef28d2ca02310220.tar.gz
kernel-qcow2-linux-2a6fc3cb5cb68597f1072bfeef28d2ca02310220.tar.xz
kernel-qcow2-linux-2a6fc3cb5cb68597f1072bfeef28d2ca02310220.zip
drm/tegra: Fix gpiod_get_from_of_node() regression
That function now returns ERR_PTR instead of NULL if "hpd-gpio" is not present in device-tree. The offending patch missed to adapt the Tegra's DRM driver for the API change. Fixes: 025bf37725f1 ("gpio: Fix return value mismatch of function gpiod_get_from_of_node()") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/tegra/output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 274cb955e2e1..bdcaa4c7168c 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -126,8 +126,12 @@ int tegra_output_probe(struct tegra_output *output)
"nvidia,hpd-gpio", 0,
GPIOD_IN,
"HDMI hotplug detect");
- if (IS_ERR(output->hpd_gpio))
- return PTR_ERR(output->hpd_gpio);
+ if (IS_ERR(output->hpd_gpio)) {
+ if (PTR_ERR(output->hpd_gpio) != -ENOENT)
+ return PTR_ERR(output->hpd_gpio);
+
+ output->hpd_gpio = NULL;
+ }
if (output->hpd_gpio) {
err = gpiod_to_irq(output->hpd_gpio);