[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb665284-31f0-4e95-8f24-c2782bec72bd@quicinc.com>
Date: Wed, 13 Nov 2024 02:00:14 +0530
From: Akhil P Oommen <quic_akhilpo@...cinc.com>
To: Colin Ian King <colin.i.king@...il.com>, Rob Clark <robdclark@...il.com>,
Sean Paul <sean@...rly.run>, Konrad Dybcio <konradybcio@...nel.org>,
"Abhinav
Kumar" <quic_abhinavk@...cinc.com>,
Dmitry Baryshkov
<dmitry.baryshkov@...aro.org>,
Marijn Suijten
<marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>, "Simona
Vetter" <simona@...ll.ch>,
<linux-arm-msm@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<freedreno@...ts.freedesktop.org>
CC: <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][V2] drm/msm/a5xx: remove null pointer check on pdev
On 11/12/2024 11:52 PM, Colin Ian King wrote:
> The call chain on a5xx_gpu_init is such that pdev is not going to be
> null, so the null check on pdev can be removed. This also cleans up
> a static analysis warning where pdev is dereferenced before the null
> check which cannot actually occur.
>
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
>
Reviewed-by: Akhil P Oommen <quic_akhilpo@...cinc.com>
-Akhil
> ---
>
> V2: rewrite Subject, remove null check on pdev
>
> ---
> drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> index ee89db72e36e..4edf9109d1d8 100644
> --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> @@ -1760,11 +1760,6 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
> unsigned int nr_rings;
> int ret;
>
> - if (!pdev) {
> - DRM_DEV_ERROR(dev->dev, "No A5XX device is defined\n");
> - return ERR_PTR(-ENXIO);
> - }
> -
> a5xx_gpu = kzalloc(sizeof(*a5xx_gpu), GFP_KERNEL);
> if (!a5xx_gpu)
> return ERR_PTR(-ENOMEM);
Powered by blists - more mailing lists