From nobody Sat Feb 7 17:55:35 2026 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 B3D833570B4; Thu, 29 Jan 2026 02:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769655023; cv=none; b=GuBUlrX1aVM8oqvaI+7X9YfTaBvxDjSTJx03xqOkEojHN3PgxfAJj8VA5yQOkKt62hbQ+fxuiZWq4x05bKFbByT7WVQTvwim6+2KvKyzcZvWFsFMagCdX1nif1HgZBCwSu5DMf2ITg4QsmOyllekT67IfPWelChqayomr00R4+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769655023; c=relaxed/simple; bh=aMy6cyy08ml3JgdiwozTnc63ZLFrmEaGVYFaLd1y5rc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HaFbuWhyjy2xBuIMvMJK6ojaIvGHGJkduMSbn3RCFF0EZtKdEzRE5B4iwtLylAVYhTirZup0fCOLf9WfnvGfQoYiHDbShERNcGSfv79d4mnNAiT62E8WydadQ6NRkj9kkXJjp5FELi/u8fUgn+XAJ7Rqe1A6wJd4H7PhpTsNNHw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=JG+j+f9F; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="JG+j+f9F" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1769655012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0LxstW29k/h/2F7AZ/O8A+GqEd32z7jzPtpyQ0dWEUQ=; b=JG+j+f9Fe/HLug+o+caz4zwkyGcp/qX2uNIIpAKU0L1ZplRLRmJNRJm6d/f5oeQ8DrydYI xGfh2QarC5IDlo1mHBeRtg9mSLgUt7AIjDxCFhwhX8OkMadq4jXMM7LJXTxVPmx2oZiL+2 P7MPkEE2yPHFgUudYu421dCOvpIHz7c= From: sunliming@linux.dev To: robin.clark@oss.qualcomm.com, lumag@kernel.org, airlied@gmail.com, simona@ffwll.ch Cc: sean@poorly.run, marijn.suijten@somainline.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, sunliming , kernel test robot , Dan Carpenter Subject: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check Date: Thu, 29 Jan 2026 10:49:19 +0800 Message-Id: <20260129024919.30449-1-sunliming@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: sunliming Fix below smatch warnings: drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 dpu_hw_sspp_setup_pe_co= nfig_v13() warn: variable dereferenced before check 'ctx' (see line 159) Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202601252214.oEaY3UZM-lkp@intel.com/ Signed-off-by: sunliming Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c b/drivers/gpu/= drm/msm/disp/dpu1/dpu_hw_sspp_v13.c index e65f1fc026fd..312ee6597ab1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c @@ -156,11 +156,13 @@ static void dpu_hw_sspp_setup_pe_config_v13(struct dp= u_hw_sspp *ctx, u8 color; u32 lr_pe[4], tb_pe[4]; const u32 bytemask =3D 0xff; - u32 offset =3D ctx->cap->sblk->sspp_rec0_blk.base; + u32 offset; =20 if (!ctx || !pe_ext) return; =20 + offset =3D ctx->cap->sblk->sspp_rec0_blk.base; + c =3D &ctx->hw; /* program SW pixel extension override for all pipes*/ for (color =3D 0; color < DPU_MAX_PLANES; color++) { --=20 2.25.1