From patchwork Mon May 23 01:52:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 68322 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp978701qge; Sun, 22 May 2016 18:51:40 -0700 (PDT) X-Received: by 10.66.80.72 with SMTP id p8mr23776982pax.38.1463968300829; Sun, 22 May 2016 18:51:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11si335017pfa.84.2016.05.22.18.51.40; Sun, 22 May 2016 18:51:40 -0700 (PDT) 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=@nifty.com; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752827AbcEWBvi (ORCPT + 30 others); Sun, 22 May 2016 21:51:38 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:49829 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752740AbcEWBvg (ORCPT ); Sun, 22 May 2016 21:51:36 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u4N1p1wl003075; Mon, 23 May 2016 10:51:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u4N1p1wl003075 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1463968262; bh=M5ZVbIPhVRAwt4LMX5WqD0oB2QcUd33CCjgTNx2cLSY=; h=From:To:Cc:Subject:Date:From; b=y9JRUjmixrifiduzu12MHRmmb4LgX4FiYiyiavBJRRTkVFtrEAbygTJWv1pJI4T9i F8UH9HRCNWNCtf6S5yHq+If5AZlr5UtYz0rS7o2wvYNKOaUrt8aQ2NWeULYsTQE+7l 37KBV4QphSILtAUdNFdf1SWmU8oTGWTey+XZLSpu6/zuT4CkT7N5WnBW4k8Vd8ewbm d1kOpGFHtVILcli7mVJIg/ZEDC26vbEhjLLR7+7u5Fjhsvalq38ao9yPvhxuEJzxX7 3LcSDgCNaIYOk9mGss3S98/WcnMaT0rf1lAUXWekCZYsWBfCJD47DxeZhPo+LOqshB UbkfCKcPoQO+w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-gpio@vger.kernel.org Cc: Masahiro Yamada , Linus Walleij , Alexandre Courbot , linux-kernel@vger.kernel.org Subject: [PATCH] gpio: of: add missing of_node_put() to of_gpiochip_add_pin_range() Date: Mon, 23 May 2016 10:52:09 +0900 Message-Id: <1463968329-9530-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the comment block of of_parse_phandle_with_fixed_args() says, the caller is responsible to call of_node_put() on the returned node when done. Signed-off-by: Masahiro Yamada --- drivers/gpio/gpiolib-of.c | 1 + 1 file changed, 1 insertion(+) -- 1.9.1 diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index d22dcc3..d8c36c1 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -409,6 +409,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) break; pctldev = of_pinctrl_get(pinspec.np); + of_node_put(pinspec.np); if (!pctldev) return -EPROBE_DEFER;