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

Commit cb8a9fac authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Yabin Cui
Browse files

UPSTREAM: coresight: tmc: Cleanup power management



(Upstream commit 263556950f2ad764bad4f98fbc5a9d711fd653a6).

Drop the power only if we were successful in probing the device.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 140266694
Change-Id: I2ee34b0d1a344255fe2d3250d5f8c0cf1ee71e2c
Signed-off-by: default avatarYabin Cui <yabinc@google.com>
parent 1e421be1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -432,8 +432,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
		drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4;
	}

	pm_runtime_put(&adev->dev);

	desc.pdata = pdata;
	desc.dev = dev;
	desc.groups = coresight_tmc_groups;
@@ -475,6 +473,8 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
	ret = misc_register(&drvdata->miscdev);
	if (ret)
		coresight_unregister(drvdata->csdev);
	else
		pm_runtime_put(&adev->dev);
out:
	return ret;
}