Skip to content

Commit 2a6fc3c

Browse files
digetxthierryreding
authored andcommitted
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: 025bf37 ("gpio: Fix return value mismatch of function gpiod_get_from_of_node()") Signed-off-by: Dmitry Osipenko <[email protected]> Acked-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 5f9e832 commit 2a6fc3c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/gpu/drm/tegra/output.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ int tegra_output_probe(struct tegra_output *output)
126126
"nvidia,hpd-gpio", 0,
127127
GPIOD_IN,
128128
"HDMI hotplug detect");
129-
if (IS_ERR(output->hpd_gpio))
130-
return PTR_ERR(output->hpd_gpio);
129+
if (IS_ERR(output->hpd_gpio)) {
130+
if (PTR_ERR(output->hpd_gpio) != -ENOENT)
131+
return PTR_ERR(output->hpd_gpio);
132+
133+
output->hpd_gpio = NULL;
134+
}
131135

132136
if (output->hpd_gpio) {
133137
err = gpiod_to_irq(output->hpd_gpio);

0 commit comments

Comments
 (0)