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

Commit 9c08fa8c authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: place pm_runtime_put() properly"

parents 4dc95177 92dd0e70
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2012,2018 The Linux Foundation. All rights reserved.
 *
 * Description: CoreSight Embedded Trace Buffer driver
 */
@@ -674,7 +674,6 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
	spin_lock_init(&drvdata->spinlock);

	drvdata->buffer_depth = etb_get_buffer_depth(drvdata);
	pm_runtime_put(&adev->dev);

	if (drvdata->buffer_depth & 0x80000000)
		return -EINVAL;
@@ -700,6 +699,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
	ret = misc_register(&drvdata->miscdev);
	if (ret)
		goto err_misc_register;
	pm_runtime_put(&adev->dev);

	return 0;

+4 −2
Original line number Diff line number Diff line
@@ -667,8 +667,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);

	ret = of_get_coresight_csr_name(adev->dev.of_node, &drvdata->csr_name);
	if (ret)
		dev_err(dev, "No csr data\n");
@@ -727,6 +725,10 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
		coresight_unregister(drvdata->csdev);
		goto out_iommu_deinit;
	}

	if (!ret)
		pm_runtime_put(&adev->dev);

	return ret;

out_iommu_deinit: