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 E108F1F91E3; Mon, 22 Sep 2025 19:46:04 +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=1758570365; cv=none; b=M26vqhY5SGNzcQX9RRdv3fkLSjpFC2A606u4N7htiB5wFV5li5DT0K2PyDEChWy5ffqN7rYMVCQN302mxnALrcZ0MbvLeS8wuuu7hBTk61yui3kcL5tuoipMnX5zpZeim6cn6h5C3jlg/aK6BEIcx5itgVB+305p+47F+4TW30o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758570365; c=relaxed/simple; bh=dxiD2YU895bk+WP8WgFXQ4PAfyR/sarOkEj0rhq/I7w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kJeOjembRyBtOZrh4cXApR5c1uvmPoTq6HzW85yjmDGqeQFQ39Ed0RjO6xCjWmCCmcGsxDLO5mar7ddwI8fVPp7R/g0zym+R1Mv+orL9KsD53J+HO9KAMy8qMX0awqhgQw1U78mamKoZG0u3KGi9qhzb48KtOAn2fnDKl4iprrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NlhEutPp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NlhEutPp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A87DC4CEF0; Mon, 22 Sep 2025 19:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758570364; bh=dxiD2YU895bk+WP8WgFXQ4PAfyR/sarOkEj0rhq/I7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NlhEutPpxPF9KeEDXJcgkdkTnQkEHgAMHZU+bm/mKdeKoIjLIZb6dwh+LMKE+N51T Xn5HBE8QlcY6gNZZLSQxQKB+/ebzspVoyfOPl5ZJNlgYVYifARRjMCAEcIAH7b83Ao Ia6xcsVSjN4Cl7yG/ujM0h4u+bKRH4NhRTrcmloM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hulk Robot , Qi Xi , Luca Ceresoli , Dmitry Baryshkov , Sasha Levin Subject: [PATCH 6.16 120/149] drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path Date: Mon, 22 Sep 2025 21:30:20 +0200 Message-ID: <20250922192415.900134818@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922192412.885919229@linuxfoundation.org> References: <20250922192412.885919229@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Qi Xi [ Upstream commit 288dac9fb6084330d968459c750c838fd06e10e6 ] Add missing mutex unlock before returning from the error path in cdns_mhdp_atomic_enable(). Fixes: 935a92a1c400 ("drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference") Reported-by: Hulk Robot Signed-off-by: Qi Xi Reviewed-by: Luca Ceresoli Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250904034447.665427-1-xiqi2@huawei.com Signed-off-by: Luca Ceresoli Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index b431e7efd1f0d..dbef0ca1a22a3 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -1984,8 +1984,10 @@ static void cdns_mhdp_atomic_enable(struct drm_bridge *bridge, mhdp_state = to_cdns_mhdp_bridge_state(new_state); mhdp_state->current_mode = drm_mode_duplicate(bridge->dev, mode); - if (!mhdp_state->current_mode) - return; + if (!mhdp_state->current_mode) { + ret = -EINVAL; + goto out; + } drm_mode_set_name(mhdp_state->current_mode); -- 2.51.0