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

Commit fe654b1f authored by Hareesh Gundu's avatar Hareesh Gundu Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Return error on gmu request irq failure



Ensure error value is returned from the gmu_probe()
incase of gmu irq request failure.

Change-Id: Iae9ef0026c68c990787adac493cc927929b1197d
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 2a98f234
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#include <dt-bindings/regulator/qcom,rpmh-regulator-levels.h>
@@ -1339,14 +1339,17 @@ static int gmu_probe(struct kgsl_device *device, struct device_node *node)
	device->gmu_core.reg_len = gmu->reg_len;

	/* Initialize HFI and GMU interrupts */
	hfi->hfi_interrupt_num = kgsl_request_irq(gmu->pdev, "kgsl_hfi_irq",
	ret = kgsl_request_irq(gmu->pdev, "kgsl_hfi_irq",
			hfi_irq_handler, device);
	if (ret < 0)
		goto error;
	hfi->hfi_interrupt_num = ret;

	gmu->gmu_interrupt_num = kgsl_request_irq(gmu->pdev, "kgsl_gmu_irq",
	ret = kgsl_request_irq(gmu->pdev, "kgsl_gmu_irq",
			gmu_irq_handler, device);

	if (hfi->hfi_interrupt_num < 0 || gmu->gmu_interrupt_num < 0)
	if (ret < 0)
		goto error;
	gmu->gmu_interrupt_num = ret;

	/* Don't enable GMU interrupts until GMU started */
	/* We cannot use irq_disable because it writes registers */