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 BF089C43603 for ; Sun, 15 Dec 2019 13:26:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 908AC20700 for ; Sun, 15 Dec 2019 13:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576416372; bh=MiZ6WTwKw8LTlHLi2GTHPPxGBXLeBdSpeWj9itCRHiU=; h=Subject:To:Cc:From:Date:List-ID:From; b=sZQ1nYGPCxhQKvcMv9R8dWdmdj8UXdA9cHLTKK3EdsT3GppkYxlF1aoMnBrcyVrCf MWh2BWI/RZvpC9YO918pd9+cTFEfds2DAvDXPADtmCkh+mSPJEwsiB+SIKY7vvPHCo zNfJTQIY3NgFo3JJSIR/AsIG/cj68zHP24NmwPTA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbfLON0M (ORCPT ); Sun, 15 Dec 2019 08:26:12 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41313 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbfLON0L (ORCPT ); Sun, 15 Dec 2019 08:26:11 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A02392222B; Sun, 15 Dec 2019 08:26:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 15 Dec 2019 08:26:10 -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=VAT+80 20Zc7HM6p7QuVyyHPCm0ImPQLeKvsj/AZHLsI=; b=Ltl6uZsnpB2bBhYOvc/n1k ec2rZNUr93FIMKBryQrUyOg8JpuVBAqNEQNtY3e2FDXIuPiJWNb1mYg4RMmBg0z2 y1kl3CmaWgo6MKCto9QL4dJefqOa9XrhyzQADrs3KXSjZRjNkgEORT3wzqo/WYgp 1HYoCwnpUXf24Okl5k8tWq05C8AyIcbxxuxAkiQucQq1Mzann6lxAPlFaJ/q3PMd zW6Webvy15bUdfWzyP7paLLQKIyOaJyDBUdwWbB8tavTzK2XG1FTgxPWC1DCifn+ Yej00EKKJLrJveek75CGNPECNCLXTAHhX95DelBrAMw0ukOlkTgVuJGWYJn58mVA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddtfedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd 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 392B330600FE; Sun, 15 Dec 2019 08:26:10 -0500 (EST) Subject: FAILED: patch "[PATCH] pinctrl: samsung: Add of_node_put() before return in error" failed to apply to 4.4-stable tree To: nishkadg.linux@gmail.com, krzk@kernel.org, stable@vger.kernel.org Cc: From: Date: Sun, 15 Dec 2019 14:26:08 +0100 Message-ID: <1576416368215161@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.4-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; }