Hello Akhil P Oommen,

This is a semi-automatic email about new static checker warnings.

Commit 491fadb2b818 ("drm/msm/adreno: Move adreno_gpu_func to
catalogue") from Nov 18, 2025, leads to the following Smatch
complaint:

drivers/gpu/drm/msm/adreno/a3xx_gpu.c:530 a3xx_gpu_init() warn: variable 
dereferenced before check 'pdev' (see line 525)
drivers/gpu/drm/msm/adreno/a4xx_gpu.c:642 a4xx_gpu_init() warn: variable 
dereferenced before check 'pdev' (see line 637)
drivers/gpu/drm/msm/adreno/a2xx_gpu.c:503 a2xx_gpu_init() warn: variable 
dereferenced before check 'pdev' (see line 500)

drivers/gpu/drm/msm/adreno/a3xx_gpu.c
   524          struct platform_device *pdev = priv->gpu_pdev;
   525          struct adreno_platform_config *config = pdev->dev.platform_data;
                                                        ^^^^^^
The patch adds a new unchecked dereference.

   526          struct icc_path *ocmem_icc_path;
   527          struct icc_path *icc_path;
   528          int ret;
   529  
   530          if (!pdev) {
                    ^^^^^
But the old  code assumed pdev could be NULL.

   531                  DRM_DEV_ERROR(dev->dev, "no a3xx device\n");
   532                  ret = -ENXIO;

regards,
dan carpenter

Reply via email to