]> Git Repo - linux.git/commitdiff
drm/msm/a5xx: remove null pointer check on pdev
authorColin Ian King <[email protected]>
Tue, 12 Nov 2024 18:22:18 +0000 (18:22 +0000)
committerRob Clark <[email protected]>
Fri, 3 Jan 2025 15:20:28 +0000 (07:20 -0800)
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 <[email protected]>
Reviewed-by: Akhil P Oommen <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/624180/
Signed-off-by: Rob Clark <[email protected]>
drivers/gpu/drm/msm/adreno/a5xx_gpu.c

index caf2c0a7a29f16a280bc0450272daee117d1c6d8..71dca78cd7a5324e9ff5b14f173e2209fa42e196 100644 (file)
@@ -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);
This page took 0.054164 seconds and 4 git commands to generate.