From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EDB31B8EA8; Thu, 1 Aug 2024 00:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722472267; cv=none; b=tfXfUXAmTxglqDrWOmRgJ8H2dVVHtRQTem3rY1VsOBoJCb3fIQvEeEV/dSEgN6R5n/IuXj7bA7qleBxnUa+lEyT2rnGyDpXXLmeS0zU9d2+0qk23bBiYpCOyMacypmOAWuGQdVCNWvIemESsKSwWnmLiN2sbc2yjgkwO3+KqCus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722472267; c=relaxed/simple; bh=LMbDleCu2LDjEQVy6fy6hqERvgQ17LQ2hr295RGkXpw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i+DClY4E6XpBwPp5/vFeb6mc5C9sAow7hfYhw9xFC2E6iY54OpUQrk+oTXj1GCZeTUTERYOxcQavt/lsyptXGwtPfGb+md4Do7GUA0VeeuI/D0oKREA/KyrPYoYOhsRLdfv6Q6R4/qqN9rmZYaPazfxZidRan/09Sj57XMuGOHs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kPfUx7Jy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kPfUx7Jy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37F2DC32786; Thu, 1 Aug 2024 00:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722472267; bh=LMbDleCu2LDjEQVy6fy6hqERvgQ17LQ2hr295RGkXpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kPfUx7JyjEkN1fwKC88a/5OGx/Ctv8hMSbpMvY46Z53+T65WUXavC3DTNe2L6eL00 6+PNS8aM9YicyjRKZ6CY+f24cKK2WdaQZo9fFemAFs3vbaT+9UsFBzKGf3BqI2+WaH mFi7huNas+9IYlo6xRMvORvYf4CICIN24DL4ph8StTIxJvPDgirFdtZ1zI797m7Yhz 3oHVHM6KRE8zryUXx0oXJh83Cy8lGw7KFIgNpxL/oWm3f8agf2UAP3Or2SMtm9Xjvb RKtEQ3DRpgYjKsrRuiu8CACmdmWxd2o7nDfm4+ztc33gKLKkEtKJvoT7MAWtdTsyew prBqSbQKYps+A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Hung , Rodrigo Siqueira , Daniel Wheeler , Alex Deucher , Sasha Levin , harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, wenjing.liu@amd.com, marcelomspessoto@gmail.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.1 49/61] drm/amd/display: Check HDCP returned status Date: Wed, 31 Jul 2024 20:26:07 -0400 Message-ID: <20240801002803.3935985-49-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240801002803.3935985-1-sashal@kernel.org> References: <20240801002803.3935985-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.102 Content-Transfer-Encoding: 8bit From: Alex Hung [ Upstream commit 5d93060d430b359e16e7c555c8f151ead1ac614b ] [WHAT & HOW] Check mod_hdcp_execute_and_set() return values in authenticated_dp. This fixes 3 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- .../amd/display/modules/hdcp/hdcp1_execution.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c index 1ddb4f5eac8e5..93c0455766ddb 100644 --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c @@ -433,17 +433,20 @@ static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp, } if (status == MOD_HDCP_STATUS_SUCCESS) - mod_hdcp_execute_and_set(mod_hdcp_read_bstatus, + if (!mod_hdcp_execute_and_set(mod_hdcp_read_bstatus, &input->bstatus_read, &status, - hdcp, "bstatus_read"); + hdcp, "bstatus_read")) + goto out; if (status == MOD_HDCP_STATUS_SUCCESS) - mod_hdcp_execute_and_set(check_link_integrity_dp, + if (!mod_hdcp_execute_and_set(check_link_integrity_dp, &input->link_integrity_check, &status, - hdcp, "link_integrity_check"); + hdcp, "link_integrity_check")) + goto out; if (status == MOD_HDCP_STATUS_SUCCESS) - mod_hdcp_execute_and_set(check_no_reauthentication_request_dp, + if (!mod_hdcp_execute_and_set(check_no_reauthentication_request_dp, &input->reauth_request_check, &status, - hdcp, "reauth_request_check"); + hdcp, "reauth_request_check")) + goto out; out: return status; } -- 2.43.0