summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bridge/tc358767.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2023-11-03 16:14:06 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2023-12-07 10:21:44 +0300
commit32bd29b619638256c5b75fb021d6d9f12fc4a984 (patch)
tree10fdbf16922678fdb4146a7355fa7cc901e64faa /drivers/gpu/drm/bridge/tc358767.c
parent155d6fb61270dd297f128731cd155080deee8f3a (diff)
downloadlinux-32bd29b619638256c5b75fb021d6d9f12fc4a984.tar.xz
drm/bridge: tc358767: Fix return value on error case
If the hpd_pin is invalid, the driver returns 'ret'. But 'ret' contains 0, instead of an error value. Return -EINVAL instead. Fixes: f25ee5017e4f ("drm/bridge: tc358767: add IRQ and HPD support") Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-4-c22b2444f5f5@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/bridge/tc358767.c')
-rw-r--r--drivers/gpu/drm/bridge/tc358767.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index ef2e373606ba..615cc8f950d7 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -2273,7 +2273,7 @@ static int tc_probe(struct i2c_client *client)
} else {
if (tc->hpd_pin < 0 || tc->hpd_pin > 1) {
dev_err(dev, "failed to parse HPD number\n");
- return ret;
+ return -EINVAL;
}
}