Skip to content

Commit 155d6fb

Browse files
committed
drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable
'ret' could be uninitialized at the end of the function, although it's not clear if that can happen in practice. Fixes: 6a3608e ("drm: bridge: cdns-mhdp8546: Enable HDCP") Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f9af8f0 commit 155d6fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ static int _cdns_mhdp_hdcp_disable(struct cdns_mhdp_device *mhdp)
403403

404404
static int _cdns_mhdp_hdcp_enable(struct cdns_mhdp_device *mhdp, u8 content_type)
405405
{
406-
int ret, tries = 3;
406+
int ret = -EINVAL;
407+
int tries = 3;
407408
u32 i;
408409

409410
for (i = 0; i < tries; i++) {

0 commit comments

Comments
 (0)