Skip to content

Commit 19dbdbf

Browse files
ColinIanKingrobclark
authored andcommitted
drm/msm/a5xx: remove null pointer check on pdev
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]>
1 parent 3a47f4b commit 19dbdbf

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/gpu/drm/msm/adreno/a5xx_gpu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,11 +1760,6 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
17601760
unsigned int nr_rings;
17611761
int ret;
17621762

1763-
if (!pdev) {
1764-
DRM_DEV_ERROR(dev->dev, "No A5XX device is defined\n");
1765-
return ERR_PTR(-ENXIO);
1766-
}
1767-
17681763
a5xx_gpu = kzalloc(sizeof(*a5xx_gpu), GFP_KERNEL);
17691764
if (!a5xx_gpu)
17701765
return ERR_PTR(-ENOMEM);

0 commit comments

Comments
 (0)