From patchwork Mon Apr 15 16:03:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 162205 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3104898jan; Mon, 15 Apr 2019 09:05:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJMV4TQMbcnp/cWLmjeqnU+XiMdC9iobhz4tY7nFjUlpbsM63GIRvgHkhaj/9Z516SJ/MO X-Received: by 2002:aa7:8b4c:: with SMTP id i12mr70196257pfd.189.1555344355689; Mon, 15 Apr 2019 09:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555344355; cv=none; d=google.com; s=arc-20160816; b=o80l63bMaMb+DShWqUM6KZfc6sBMg09CiKPeNE724arv0plHx1CGIi6vHYycn5a402 lm79hNxM07o3DL8wJ08pbI2wzLMT7YP4Avu4ljMU0ZWGTSqvEqpEAqNGdpEOUwTNMCPY HvbhBdP12TvqZ4UuYIM2yUwPgtuKVUyfOp/c/pufsxcGbdRN+WtwenH4t9Vt8HpYBAit mbYaCcecScM7sNOerq+ts447e17nY7R7u6ZpuR6A/LY7cRazIPWdvRwUZ0DbUfaBIK/2 kPIDEU+DfWyHR9IzR8AcJnJ/9oQbsbZRwqQK53yMClI36oQsNKCWBlhc/lmIUQo1744M Zksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=DeZeRPZen73+TrzNi9rRybk2ZjsBxbjKko9nE3q6HmY=; b=pY1Zmiq/vWPaHhsZ7n1Ri6Szr8LD8aHqOF3/53Pb+39WguS5T0l9dNgglcUPSnjbzt BgfAgqqt1Jxmn29ttx/3oxzhV51+6c2qVOhx7c0vhvMmptPNXkSGIKUXZpS1T2+8saMr IZFlt1xF9Z/0yL/aRsSNx1m3wtsGBAcPovnoJdP/MCQMnnNLgbDB7QH4+UFL7O4MPPqX MeLYYeNOGpuido9mycYfIQZa/+5P3oE/H3SPgcRo6ihZGzY8/Bv4iofpsbRnWi1ogwFd O83U5KzaRHowCAgtGCf1Ch5LG6yV/I3Wn18jv5rJtxJbu/tf4LavLfm0i/lAAnnhLoCJ fv8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si23771255pgr.529.2019.04.15.09.05.55; Mon, 15 Apr 2019 09:05:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727855AbfDOQFy (ORCPT + 30 others); Mon, 15 Apr 2019 12:05:54 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:37688 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727838AbfDOQFw (ORCPT ); Mon, 15 Apr 2019 12:05:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AE0DA80D; Mon, 15 Apr 2019 09:05:51 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B7DE3F68F; Mon, 15 Apr 2019 09:05:50 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mathieu.poirier@linaro.org, mike.leach@linaro.org, rjw@rjwysocki.net, robert.walker@arm.com, Suzuki K Poulose Subject: [PATCH v2 04/36] coresight: catu: Cleanup power management Date: Mon, 15 Apr 2019 17:03:47 +0100 Message-Id: <1555344260-12375-5-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555344260-12375-1-git-send-email-suzuki.poulose@arm.com> References: <1555344260-12375-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/hwtracing/coresight/coresight-catu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c index 170fbb6..f2a6a8d 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; }