Skip to content

Commit

Permalink
drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable
Browse files Browse the repository at this point in the history
'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 <mripard@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-3-c22b2444f5f5@ideasonboard.com
  • Loading branch information
Tomi Valkeinen committed Dec 7, 2023
1 parent f9af8f0 commit 155d6fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ static int _cdns_mhdp_hdcp_disable(struct cdns_mhdp_device *mhdp)

static int _cdns_mhdp_hdcp_enable(struct cdns_mhdp_device *mhdp, u8 content_type)
{
int ret, tries = 3;
int ret = -EINVAL;
int tries = 3;
u32 i;

for (i = 0; i < tries; i++) {
Expand Down

0 comments on commit 155d6fb

Please sign in to comment.