From: Suzuki K Poulose Date: Thu, 25 Apr 2019 19:52:49 +0000 (-0600) Subject: coresight: catu: Cleanup power management X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2390d4586475e2e4fdff1ad281fb33e73b41b5cc;p=openwrt%2Fstaging%2Fblogic.git coresight: catu: Cleanup power management Drop the power handle only if we were successful. Otherwise the AMBA bus code would do the rest. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c index 057627a0753d..4ea68a3522e9 100644 --- a/drivers/hwtracing/coresight/coresight-catu.c +++ b/drivers/hwtracing/coresight/coresight-catu.c @@ -557,8 +557,9 @@ static int catu_probe(struct amba_device *adev, const struct amba_id *id) drvdata->csdev = coresight_register(&catu_desc); if (IS_ERR(drvdata->csdev)) ret = PTR_ERR(drvdata->csdev); + else + pm_runtime_put(&adev->dev); out: - pm_runtime_put(&adev->dev); return ret; }