From patchwork Tue Feb 2 21:13:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 61047 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp985817lbb; Tue, 2 Feb 2016 13:16:51 -0800 (PST) X-Received: by 10.98.19.205 with SMTP id 74mr49104644pft.31.1454447811566; Tue, 02 Feb 2016 13:16:51 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id r82si4015649pfa.214.2016.02.02.13.16.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 13:16:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQiIk-0003KQ-Bu; Tue, 02 Feb 2016 21:15:54 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQiHX-0001Cf-9f for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2016 21:14:41 +0000 Received: by mail-pf0-x230.google.com with SMTP id w123so610595pfb.0 for ; Tue, 02 Feb 2016 13:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DGiO6jbtiE7z3M6U8cPqzVMZsw/1n22tqBlGc89sGRQ=; b=DNqjvM5tycGPvJCll+r83ViPcO4UKUNfNsQwm0+c30D9pSJ+RFfz3JeFkJoWEH3MKL 1aCMvlHA5wguAl72FTWD/kKpI2b1rTmIeYEjreVKCfJ5jBtAA7I3xrZ4E/PnMtFrlKWn VxBfLJXVio5xb3pk2TAbkXynpa+ON59V4MNTc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DGiO6jbtiE7z3M6U8cPqzVMZsw/1n22tqBlGc89sGRQ=; b=RC6nLwZ0fJ4HayJYOiTSaFTlZ0TWrTxz2D/QHzKRoJEaViGsfnizanPBY4SoCrEkcr S2vts6qw8hJzaOSNRHR2jqD8kFnqpj+bOo+yS6E0XmNWmIReLdWS3OSWIgP0HdZuzgro vs0hxhXBGEl9Uj2d8aPYbMAWcXtBPq7RE45Ci/L0PO4QK/vG0VCd+6mVh/APQj3MVAwR K2/aNPxpqMNyOUjNHErRwVnfTCMUh8AJjB7DQQRMaNH/aivkb50dRL7xRZUoG4/WZ4tI nhNmHlOWajmBdPSgl/vZAvHYzlCdETYN9lUJAQ3T6dRie7wMSTUxSEXD7SejX96pbuK0 umcQ== X-Gm-Message-State: AG10YORtvqXsVVLUafUswkwOQGWqct9E1V02M8nx2vycMyZORWvJA7e6fg4Wpto8k25J5WBr X-Received: by 10.98.65.91 with SMTP id o88mr50057038pfa.114.1454447658561; Tue, 02 Feb 2016 13:14:18 -0800 (PST) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id 79sm4769141pfr.22.2016.02.02.13.14.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Feb 2016 13:14:17 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 4/7] coresight: release reference taken by 'bus_find_device()' Date: Tue, 2 Feb 2016 14:13:58 -0700 Message-Id: <1454447641-29153-5-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454447641-29153-1-git-send-email-mathieu.poirier@linaro.org> References: <1454447641-29153-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160202_131439_481199_03A43835 X-CRM114-Status: GOOD ( 10.86 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:230 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The reference count taken by function bus_find_device() needs to be released if a child device is found, something this patch is adding. Reported-by: Rabin Vincent Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index 8872db4410eb..a35ca54a76c9 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -570,6 +570,8 @@ static void coresight_fixup_device_conns(struct coresight_device *csdev) if (dev) { conn->child_dev = to_coresight_device(dev); + /* and put reference from 'bus_find_device()' */ + put_device(dev); } else { csdev->orphan = true; conn->child_dev = NULL;