Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2439263imu; Thu, 24 Jan 2019 12:48:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN7z+DazhjCxweewMv742yE5pj2GRJZJJzgC2J2ufBMB9cSsbz6RUHopdt9oya4qnWPW3vyw X-Received: by 2002:a62:3541:: with SMTP id c62mr7993313pfa.19.1548362915067; Thu, 24 Jan 2019 12:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548362915; cv=none; d=google.com; s=arc-20160816; b=mZGhYc7kwjVfhDDEIcFPzfjOZrxZ5P4gZOqU90cMpcTO3FQW/dpH528CP621eySXI9 TzTvFa11cbnltGYPxvOXoI+chOwsSTzK5ABXbUuX0J/Lm05qxGdXCjI7jV2NOBjAQEul SWsgs2Og8JzskuSae/Bg7YQmnyKXWAe14M8XnzksB8+a9FXxvIaawsozA4MSxS3o/CPb GVz+D1zPflu9uMpyAI98WX0VEa63TM59xXK9lC1iUrSLdElEOiKYDc/+U0ds6Ohm22Zh 9BW/q7dnVwCVcP1NnyrFgVrDoBeP6G3SujV3bJ+wlTQ4hnWGik2WuzEp33eqlleAAa3X 6zoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Pf7PAcNEOrbLGkd46XYWQQP/wMRCGLne2czsPYxZyDg=; b=jAaOvvG7CEebBceTUNEgvR3MrrTw2NP63ep4+tQ2w0rdy/xGmDtB/CpLrTjGqu95gq Ttncnc7BLq91ZLvDr2LwtPjcvz+oF1NXm+68N8VPh6ObyuGyNSGOvMHITSRbw1znT/WA r9srz9qjHBmCFRabx83UXkkvpAHLrMyAqhK6KGxNA7ZS4sasx0fm9Vj0tTUX/jfTP7Yq riYA49W2GWYKCA/Jx6kTP/JnKTVZMlWG1aP3yR7ySSnaLi/Zdk1TqDnqgwRs5vBUFzxe 2Jv5GN7iLmbZPoAQZ/ZixF+WcDlgUuPF4fjqAnVPo81e0DZqC0Yzcblb9YiQUimITaIt +GhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=StBy9htg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si23173139pfj.219.2019.01.24.12.48.19; Thu, 24 Jan 2019 12:48:35 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=StBy9htg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbfAXUqD (ORCPT + 99 others); Thu, 24 Jan 2019 15:46:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:52470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbfAXUqC (ORCPT ); Thu, 24 Jan 2019 15:46:02 -0500 Received: from atull-730U3E-740U3E.fm.intel.com (unknown [192.55.54.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FABD218D0; Thu, 24 Jan 2019 20:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548362762; bh=b3ML7LL6HxXDmi/kR6Z3xAVmvrRzGt49J1PdUY9aejc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StBy9htgniNmj9hax1VD3FZj/nH+DiH1vB9S/IsaNOq74fiRPhWUg+3uW5+AI3Tfz 4evOhKXFJLopj6CcNANNSyCJfneI8ETZyf91YIpb3XHdyoQ0UoMY9Gzq6GH0MZd79T rNvEQV1XI7GjBcPI/1AyQcOXw9CZdFpYkkk0zCGA= From: Alan Tull To: Greg Kroah-Hartman Cc: Moritz Fischer , Dinh Nguyen , Alan Tull , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, Nicolas Saenz Julienne Subject: [PATCH 1/3] fpga: stratix10-soc: fix wrong of_node_put() in init function Date: Thu, 24 Jan 2019 14:45:52 -0600 Message-Id: <20190124204554.5438-2-atull@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124204554.5438-1-atull@kernel.org> References: <20190124204554.5438-1-atull@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Saenz Julienne After finding a "firmware" dt node stratix10 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: e7eef1d7633a ("fpga: add intel stratix10 soc fpga manager driver") Signed-off-by: Nicolas Saenz Julienne Acked-by: Alan Tull Acked-by: Moritz Fischer --- drivers/fpga/stratix10-soc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/stratix10-soc.c index a1a09e0..e75dbe5 100644 --- a/drivers/fpga/stratix10-soc.c +++ b/drivers/fpga/stratix10-soc.c @@ -509,13 +509,11 @@ static int __init s10_init(void) np = of_find_matching_node(fw_np, s10_of_match); if (!np) { - of_node_put(fw_np); return -ENODEV; } of_node_put(np); ret = of_platform_populate(fw_np, s10_of_match, NULL, NULL); - of_node_put(fw_np); if (ret) return ret; -- 2.7.4