Unverified Commit 3d987923 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12913 drm/msm/adreno: Assign msm_gpu->pdev earlier to avoid nullptrs

parents e4a5cbfa c24d2a48
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1071,6 +1071,7 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
	adreno_gpu->chip_id = config->chip_id;

	gpu->allow_relocs = config->info->family < ADRENO_6XX_GEN1;
	gpu->pdev = pdev;

	/* Only handle the core clock when GMU is not in use (or is absent). */
	if (adreno_has_gmu_wrapper(adreno_gpu) ||
+0 −1
Original line number Diff line number Diff line
@@ -927,7 +927,6 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
	if (IS_ERR(gpu->gpu_cx))
		gpu->gpu_cx = NULL;

	gpu->pdev = pdev;
	platform_set_drvdata(pdev, &gpu->adreno_smmu);

	msm_devfreq_init(gpu);