From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 986AEC43603 for ; Sun, 15 Dec 2019 13:26:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69E4E20700 for ; Sun, 15 Dec 2019 13:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576416380; bh=HnbFs98DES726fCD3clHZiavq1OueBeYqcb6TFuWEo4=; h=Subject:To:Cc:From:Date:List-ID:From; b=YVrKZCHwch9PERIemotmONz9D7cbAqDUh8mJPzydNRaCAXZ42/k/ZDQWCqU9wc27+ G6bY89iJvBHcKp8i7i1P/iE3E354qLlf212U/ZypJSNR658oGcdIguClpXh8kuxr4o drKkxa/S1JB3Ph9nU1Ju3ue+09i6Ti4rkS0dyW3o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbfLON0T (ORCPT ); Sun, 15 Dec 2019 08:26:19 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56067 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbfLON0T (ORCPT ); Sun, 15 Dec 2019 08:26:19 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C10C32223B; Sun, 15 Dec 2019 08:26:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 15 Dec 2019 08:26:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=73n8nN CHxFw4EOI5zqxnTobvJs37KVMKB/X0Xw5hIN0=; b=oA9Rt0wINoaFfp0BuGa3xt tryxRC0WFWsKpB0LMrH82avpa82d9HJwMgxxTDVs9l64VORJ/06Xn0SXwqU0csMU RLsB1Lezno11+bgoh77LGIKtS5NFhQWXSZNxZrBjhdJ+q95R9wezYmNy3H3qrHrd LXHW2+H8PVnsZGmiAee4pEXTC4y7qqFvtxA7uyUekILEDOT03PGgXB30WZvPkD8P aFl2xHEz24kK8HLDg4vuQgbns0oxOmbtcGnWQwfKLUJP4vnAYl/2qG80RhVZZo4H mDRR5LOyuIHKI5nKF9fhCEQvHvGsKuSXl2QHsw6F9YdAMIxDrEBBiUYTGohEzSNg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddtfedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 4853E8005C; Sun, 15 Dec 2019 08:26:18 -0500 (EST) Subject: FAILED: patch "[PATCH] pinctrl: samsung: Add of_node_put() before return in error" failed to apply to 4.9-stable tree To: nishkadg.linux@gmail.com, krzk@kernel.org, stable@vger.kernel.org Cc: From: Date: Sun, 15 Dec 2019 14:26:09 +0100 Message-ID: <157641636919588@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 3d2557ab75d4c568c79eefa2e550e0d80348a6bd Mon Sep 17 00:00:00 2001 From: Nishka Dasgupta Date: Sun, 4 Aug 2019 21:32:00 +0530 Subject: [PATCH] pinctrl: samsung: Add of_node_put() before return in error path Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return of exynos_eint_wkup_init() error path. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Cc: Fixes: 14c255d35b25 ("pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts") Signed-off-by: Krzysztof Kozlowski diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index ebc27b06718c..e7f4cbad2c92 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -486,8 +486,10 @@ int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) if (match) { irq_chip = kmemdup(match->data, sizeof(*irq_chip), GFP_KERNEL); - if (!irq_chip) + if (!irq_chip) { + of_node_put(np); return -ENOMEM; + } wkup_np = np; break; }