Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1690568imu; Sat, 26 Jan 2019 08:29:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN63dg9uyvzwtPO7HiLshzv5mCwOCSqVIPHBOgOW3SfVYlAns1zID0YEJu/A2zwalN+btIGE X-Received: by 2002:a17:902:42e4:: with SMTP id h91mr15822071pld.18.1548520199536; Sat, 26 Jan 2019 08:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548520199; cv=none; d=google.com; s=arc-20160816; b=LnSna7b3m8s/N3+sv4xVEYg9IQFV1YCZIDgnU7rNukkOZ1DHNhDB5jaWyh8XGM6N3w muyNYwuya8tDoa2me8HlyxFghggpdwihVMnq4Mr3ENv2pdQDISDpbd+BtMZ1KjOYYlzs WcskjLm4iEUIjqA/AZs098HWK/yr3bOgHVySsg54cSxzTZWIbsqTd+J87w74v/jrr9Pt 2w9hj2joUoVLJqNJhSq96MNzHKg2Fz7iXgdl5wNizem/wRJof35B5PI0FhKwFcOKz17y TEVVpKZTpI0lWLOPeuI3sVV4gOszyHECZic3zxwu3ZQc+nEbFMpKxi7MrUo3UMFr6qQG K5Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wI2v8k3OqJTLm/6HxRJCSyfTN/LwT/vWhSzVmSyBlTI=; b=SeIJ1chvhIZ+bauYC7F/PL6GXlM2XG9MRdVea1rj5Bhwrg/S4c90IcKRvs4EDJIPSc raSxX0W70VMFA6ItuEJ9nXonmjrXASsucZBtGnr+Q/S9jDnlN0+dom80dS0jhvrxJtoH 4rtsgaUZ93AHr6me9tiCHU5iTsjHAOhCKaZJjzEm/nKbzECP+R4l3Ho8GpOpzNaJskUo 9HFcvQDQsih+aOVw29L1WmgzTWNWLl80rbpOUlwkHqS+NB37bONPTL1mc7UP0jWijSxr OuxhTx8984WvH7KgznUD8aKRP22y2n7k3QYWGBipspEVPRiM8tWmmdTRtjefDU55fteW V+pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sZH8Zme4; 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 b11si393053pgt.289.2019.01.26.08.29.44; Sat, 26 Jan 2019 08:29:59 -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=sZH8Zme4; 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 S1726156AbfAZQ3k (ORCPT + 99 others); Sat, 26 Jan 2019 11:29:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:38862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfAZQ3k (ORCPT ); Sat, 26 Jan 2019 11:29:40 -0500 Received: from mail-yw1-f46.google.com (mail-yw1-f46.google.com [209.85.161.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 57A3D218B0; Sat, 26 Jan 2019 16:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548520179; bh=UbHiP4GwMMDVLUiMG3jJskP224BF39q2MwpcBsJbH8c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sZH8Zme4vJEU5aLvnZ453k1lIMXdEiDrIC9tAYchNsDsmSbXWnmtvlGjxvcsfoHro 5/kDklpEJhuEMw2RePgYPvWVT3X58OpEKkwb/xOduZOvoIBY6RkZnXYCTOFfem8HLG sBtYszj4rdnOwigVXpT6cdldnxDcCdi2a85QUXDg= Received: by mail-yw1-f46.google.com with SMTP id g194so5139297ywe.7; Sat, 26 Jan 2019 08:29:39 -0800 (PST) X-Gm-Message-State: AJcUukfHjELxh2NKJ+m2h09JfJ30Bv4ovAxLMe2opUKSE4NmhOhEMYWZ ih6nGDROt0oBdQ6iUVn7CZ/bxhH3UnFCMnLCfAY= X-Received: by 2002:a81:5984:: with SMTP id n126mr14692794ywb.433.1548520178606; Sat, 26 Jan 2019 08:29:38 -0800 (PST) MIME-Version: 1.0 References: <20190124204554.5438-1-atull@kernel.org> <20190124204554.5438-2-atull@kernel.org> In-Reply-To: <20190124204554.5438-2-atull@kernel.org> From: Alan Tull Date: Sat, 26 Jan 2019 10:29:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] fpga: stratix10-soc: fix wrong of_node_put() in init function To: Greg Kroah-Hartman Cc: Moritz Fischer , Dinh Nguyen , linux-kernel , linux-fpga@vger.kernel.org, Nicolas Saenz Julienne Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 24, 2019 at 2:46 PM Alan Tull wrote: > > 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; > } This leaves unnecessary braces around a single statement. I had said in the code review that I was going to clean that up. Arg! I'll resubmit this patch. Alan > > 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 >