Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7136249imu; Mon, 3 Dec 2018 08:14:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xbbrdr8q1kalNAf4FoF2VvwYsc2I/JeEjX+2wVm/ZwOrHlzf1d+2F3BKO7swOKL7n5/mlr X-Received: by 2002:a63:a91a:: with SMTP id u26mr13519284pge.349.1543853678988; Mon, 03 Dec 2018 08:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543853678; cv=none; d=google.com; s=arc-20160816; b=qT5R3FahmixHY/mA6r+vgkjpfOf/PVq/XmflnXPkE/TvmiIRRpNyarCl+w35vKgRyC 1z9yLyKIAYZl2qM0UpOBWmtbO/o41BjAvyFIM8rj6K1VR/L1KA9Id6yHO7xSwnU9A44h DGtfL9EXHXFEl4xwh586uGvF9Vz1QBLvLPuTFv/NERdqlYgELWdba2eni77TkW4jxO43 aqn8JQP/ZKGbR8qxsipzYr++SHvw6yMWSFWQrUS4Z6FW2RLWREVBESgK1lcttkt1hbbN f3KTlv4kRUBphKvy8FP00XD0qPZbrdCdb41vIgVd+C+iaUCEfzjk/6O3CZP+Y074EanJ 3rZA== 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=TI5ZovgIoVqPDHNxNrvudOvYjg2abtzWPa/mgvu6D0k=; b=zC+Pilqr6q2QukAV6vi39evNgyVaM4lcj+8fyp87uixYMNCxTJO4qwg/ZkVSdg1Z3U D7BbphT2Y6cUdXI67sY8wqJy1OSGNTgY/yBkC5n6LPkwy6QGttE3f8cuHOBZDG2cKcsx IyZ52uVaY9066zvXV3i4u/b2mTBhNYik0qarv+1tHnmYlmVok4MhwqawrCAfs9PYEaCR /ENas0BF6tTa+CuklQvsHmNpd6tqv4MbZpXHUuVxqZ0flBuq+1AO5+lREhW+80168uEc /cUyq4ip94zjv3nUaE5fd0ie5VA8yotnvWWwAidqDjyJjpq5fyaXEFvOSnpgKOnF83VF M/JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pb9rGxRx; 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 e189si14011410pfc.202.2018.12.03.08.14.15; Mon, 03 Dec 2018 08:14:38 -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=Pb9rGxRx; 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 S1726693AbeLCQNX (ORCPT + 99 others); Mon, 3 Dec 2018 11:13:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:56472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbeLCQNX (ORCPT ); Mon, 3 Dec 2018 11:13:23 -0500 Received: from mail-yw1-f47.google.com (mail-yw1-f47.google.com [209.85.161.47]) (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 55E8F208A3; Mon, 3 Dec 2018 16:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543853596; bh=CoOQvEve5ucSkdY9B16go4oJlZd2FaSD3tcs929fKSU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Pb9rGxRxV7iKQCT79+S4lQrnU6ZetWHWhPZvJv0oHm46fGR4kJNT8hE8nDKY9co5f +bQJsVmknKg9WbwkFoXDi+I9IZjz++LddAfgHawfkM0JqTzE8hZ/F3ZPvQgLNNh2IP yTZqN8rgZ9h7NOTlpKCGIHkS1uVrE2245uEIO/F0= Received: by mail-yw1-f47.google.com with SMTP id l200so5587359ywe.10; Mon, 03 Dec 2018 08:13:16 -0800 (PST) X-Gm-Message-State: AA+aEWYoDgfJQgPqglLhhX4xkQABlxs2TlL6hbH5i3vd6pXupu9eYs1w gbfPjs/qTPQ1PFxbecLP2ARkf1geJHOiYCzNwIo= X-Received: by 2002:a81:5984:: with SMTP id n126mr15855088ywb.433.1543853595331; Mon, 03 Dec 2018 08:13:15 -0800 (PST) MIME-Version: 1.0 References: <20181203122145.1534-1-nsaenzjulienne@suse.de> In-Reply-To: <20181203122145.1534-1-nsaenzjulienne@suse.de> From: Alan Tull Date: Mon, 3 Dec 2018 10:12:39 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] fpga: stratix10-soc: fix wrong of_node_put() in init function To: nsaenzjulienne@suse.de Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel 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 Mon, Dec 3, 2018 at 6:22 AM Nicolas Saenz Julienne wrote: Hi Nicolas, Thanks for catching this! I'll fix up one formatting thing (below). > > 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 > --- > 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 a1a09e04fab8..e75dbe583152 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; > } We don't need the brackets anymore around the return statement. I'll fix it up. Thanks, 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.19.2 >