From patchwork Mon Nov 26 12:15:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10698083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37A4B15A8 for ; Mon, 26 Nov 2018 12:16:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25A26296D2 for ; Mon, 26 Nov 2018 12:16:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19D48296E0; Mon, 26 Nov 2018 12:16:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C55D4296D2 for ; Mon, 26 Nov 2018 12:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ML0k2G1cthuECVLjctIeVGG2Q9yt2rtOIrEHePW3K/Y=; b=N4mGwcgVZ9YUnj KZ8WZWJ+pXVVGHOcwkhIeESxEovb64bHnV7lpgozvSAJhsA78v1eIeaNqr9l7DJN0f0rJG2CayP18 +c7q5sRH9rRpDitGn5lpRLHjI3qbQOEvR75roPR1SFPEm1sQRpIx6buyEr7Gh259mgHM09XpxwQW5 knepiVkrmLxnKC/K7/U7XUNZF+ApGEyDkNPxqGgzWyeZkVSUdMnQcbgJELUdQ2QjoPxLvFzZQDxsV XdBgcFZWJeZbVawpjeC39hkJ4zeChZsZ2GiI81Hy5ZYCgPX6b4OHkPoccz0hiSk3psISiAB8DUayD O1Agq6Hg8n/kSJQPl+yQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRFo0-0001yS-Np; Mon, 26 Nov 2018 12:16:00 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRFnx-0001xJ-L9 for linux-arm-kernel@lists.infradead.org; Mon, 26 Nov 2018 12:15:59 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 65369AF97; Mon, 26 Nov 2018 12:15:44 +0000 (UTC) From: Nicolas Saenz Julienne To: James Morse Subject: [PATCH] firmware: arm_sdei: fix wrong of_node_put() in init function Date: Mon, 26 Nov 2018 13:15:35 +0100 Message-Id: <20181126121536.28739-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181126_041557_838311_B12DD86E X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP After finding a "firmware" dt node arm_sdei tries to match it's compatible string with it. To do so it's calling of_find_matching_node() which already takes care of decreasing the refcount on the "firmware" node. We are then incorrectly decreasing the refcount on that node again. This patch removes the unwarranted call to of_node_put(). Fixes: ad6eb31ef903 ("firmware: arm_sdei: Add driver for Software Delegated Exceptions") Signed-off-by: Nicolas Saenz Julienne Acked-by: James Morse --- drivers/firmware/arm_sdei.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c index 1ea71640fdc2..dffb47c6b480 100644 --- a/drivers/firmware/arm_sdei.c +++ b/drivers/firmware/arm_sdei.c @@ -1017,7 +1017,6 @@ static bool __init sdei_present_dt(void) return false; np = of_find_matching_node(fw_np, sdei_of_match); - of_node_put(fw_np); if (!np) return false;