Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7febd6f authored by Kyle Piefer's avatar Kyle Piefer
Browse files

msm: kgsl: Only free interrupts if they have been set



During gmu_remove, we should not unconditionally free
the HFI and GMU interrupts in case probe failed early.

CRs-Fixed: 2017390
Change-Id: Ia3d9deda8937a4e23a84019757190fa57c1c72ee
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent 05688643
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -1345,12 +1345,19 @@ void gmu_remove(struct kgsl_device *device)

	gmu_stop(device);

	if (gmu->gmu_interrupt_num) {
		disable_irq(gmu->gmu_interrupt_num);
	disable_irq(hfi->hfi_interrupt_num);
		devm_free_irq(&gmu->pdev->dev,
				gmu->gmu_interrupt_num, gmu);
		gmu->gmu_interrupt_num = 0;
	}

	if (hfi->hfi_interrupt_num) {
		disable_irq(hfi->hfi_interrupt_num);
		devm_free_irq(&gmu->pdev->dev,
				hfi->hfi_interrupt_num, gmu);
		hfi->hfi_interrupt_num = 0;
	}

	if (gmu->ccl) {
		msm_bus_scale_unregister_client(gmu->ccl);