From patchwork Mon Jun 3 15:49:29 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: 165604 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4643876ili; Mon, 3 Jun 2019 08:51:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHUPtKV4ysbihc8O0DQSK+xJhv0DNpSaxSOUK3vTlzhJ/tjrmWvzd753hBNbA4FV4tLGsn X-Received: by 2002:a62:1b85:: with SMTP id b127mr32275242pfb.165.1559577067473; Mon, 03 Jun 2019 08:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577067; cv=none; d=google.com; s=arc-20160816; b=s6FUTCo/yLZ7DHjnI7wATkR7AFneKJBp3h4ytsQlbn5543d8AeN8Dd3ZFFbJcUGpn4 aG/rwCuT3j0YAHZ95/2DFLybdMj6a6Jor/phCU04cKNetX09WN8eFNwIPRWn/vnYsmgQ eIDW0Outn8VbY2Rrgwx3PjO0TFOok58PiooTyct7lhvSWZNtk/B2P698sAEHKVZlQECM 1kZF9pmC2Iti3fGscjPaBHvVhwDbuNrC2wD81PPZH9DkItxkO+Lrz0ypFB62FULTrOqY p0FSq6oUbH+LUEs1V00Mr/SQXGtKJhVQkEd78g7pIpr+owZ4PmKpiTBeP5PlETwQ+4Pl 5JQQ== 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=B1rsYvgq0M6E5jcznA4QwExcc0OZz7+JWXi4H3iLlbA=; b=ahQx24hDoLvpHiGVGm1jCDcr67lWVy0giFmEmvcVAAO9HRnZaWXI2kz2l25v86TTKo OdUcWlq6VTR5RH/RJyrD/1At0mmzMCY2j1t3jMU1cm6c4DMtZ3b+YbCipBbR1Qcs0uvI dyNxAYESQzW5jZEg7oB2CXWDbduZS/DYpS4dIsL+6362kzgT8HVpBENhnINo+xercui7 pLfdEjI8dPB4RYY2XqPwXZ3hx5q4MKAEHKtuC+nphsplMiO171ghguAKlYvZm1XF3FR6 0AG7pz0ttp9cWKksQAz1wqzHb54TdeF3Usc3CTmyq9FAFAWBrfHhw5XfM4uQHnbNMgjR qAQQ== 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 a8si18108271pgm.592.2019.06.03.08.51.07; Mon, 03 Jun 2019 08:51:07 -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 S1727649AbfFCPvG (ORCPT + 30 others); Mon, 3 Jun 2019 11:51:06 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53530 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728274AbfFCPvD (ORCPT ); Mon, 3 Jun 2019 11:51:03 -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 D37C21688; Mon, 3 Jun 2019 08:51:02 -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 BAF2E3F246; Mon, 3 Jun 2019 08:51:01 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Mathieu Poirier Subject: [RFC PATCH 03/57] drivers: coresight: Drop device references found via bus_find_device Date: Mon, 3 Jun 2019 16:49:29 +0100 Message-Id: <1559577023-558-4-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-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 We must drop references to the device found via bus_find_device(). Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index 4b13028..37ccd67 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -540,7 +540,7 @@ struct coresight_device *coresight_get_enabled_sink(bool deactivate) dev = bus_find_device(&coresight_bustype, NULL, &deactivate, coresight_enabled_sink); - + put_device(dev); return dev ? to_coresight_device(dev) : NULL; } @@ -581,7 +581,7 @@ struct coresight_device *coresight_get_sink_by_id(u32 id) dev = bus_find_device(&coresight_bustype, NULL, &id, coresight_sink_by_id); - + put_device(dev); return dev ? to_coresight_device(dev) : NULL; }