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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 C60BBC3A5A2 for ; Fri, 23 Aug 2019 09:49:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D55D204EC for ; Fri, 23 Aug 2019 09:49:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CGT5KSnd"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rX/SkVUP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D55D204EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/qbaXycfWVqw0tPEa7B+CbCnbIwLDGSRkmsEoVoCUC8=; b=CGT5KSndcbFASm 1okymuVKUvz1ixglqP1NjNP0NRtvcnnIUfRBXuAkOoxDTlcjTfLx82Cn+idTzdjtkOQIyXSyKA9Hp rG975vHiumDeJ/iV2Q5dWmPIo6RpHZCWek50+MUKfKDPSDxhV+Rvsy7BoPtpvCpHhIrVPCDlaCwcf gqhM2v4XTjh9qtOqU7IclEK35NoLgDP4dOYo7w7yoFF3cXl/U2GvjW2Z1vhk4S2gO7G+rtDTppCcS AAMfzy4ZGYXp6vHBxXx4zfsxfTPOr9IhOwhMDKwfB+w0H2KjwPDKo6dvpsnKCJNNHeNGAJlM+NZ3Q xc1ghBVjC28xhOLXlCsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i16Bv-0007Dw-9l; Fri, 23 Aug 2019 09:49:07 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i16Br-0006ps-NP for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 09:49:05 +0000 Received: by mail-lj1-x242.google.com with SMTP id l14so8271301ljj.9 for ; Fri, 23 Aug 2019 02:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZIj5J3GC6fJ/z8+TZRbG+UFUp/TNBUYk41ueKujFuvY=; b=rX/SkVUPR5Xkum4I8dMllwZbXC1J8GqzVGhKQLmtAJGWXvHSayB4J0ZHclIAfzhS/1 f0SOPcPZRdLEPalAWtVSzoFv/JBIY5IrmsWallBDJse86OTX+RAC1RxImtwA9g/3FseR Ucf8GyfUKVXrrySMNJ0T1f6zafGxlaJ4ddQUtq+lpBQryywv+xWaFS68YCwCu4ptDgFu f+zVa5bWK7uS2ueRpQGIRJs1XiUs/ebTCCTf8W3YdbpnZU0ENFuBRkwenmakiWoj4mX5 6mAZx1bSxP8v0O1GioXeSCbuTTjoJZU/vX8bEvt+corLyRnOVu7o9u61v6P3w6BxR1dP cjpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZIj5J3GC6fJ/z8+TZRbG+UFUp/TNBUYk41ueKujFuvY=; b=bC/Fv92WT/VaXWGZHP4X9Oh1E4vwGORfy2DFj2+dYAeapHL/WUuSrT2tNVyIFhyTSr nEJAmcTqctNAAFAXFdXbCJkDL/8RCUNn3hJs90up+P1umswz9tN+kVWMnzm82AcGi7Sc 155op23Hdgo7iXVo38bA9NvMEYotzOf96CIkt56DpGAcrhDm0Kp+gJM4Sz2co9kDLBD8 rfydJmJXl7fdBmWPTyK95Fo2Kt/RNsAqQ0ZgmRWY6saboY0NOHnivSHsXSIpAyLVvUHZ AL3QbkNTln4opD7SYaix+J2hYKiMocCv5Vs3F3dSIAaMIFViWsMbZFG5kRUODybx/7Kq 8ddg== X-Gm-Message-State: APjAAAX1r6UabmqipEv+w/t4X49DNvX6Qx0jDeYI37VtA/1W7h1JWJTK t52LjzI/JRu0GDP2AtCLtKE5rGB9AYWOwvyCAMjfSw== X-Google-Smtp-Source: APXvYqzzgizcf1hEzZp0DPeYQ5HNGJre4pFWBphhjTNGc0lG4u7yjHgyy1zrsnB2xD/LzIjtVs5fBSj61nDdBgIULiM= X-Received: by 2002:a2e:9903:: with SMTP id v3mr2407466lji.37.1566553738017; Fri, 23 Aug 2019 02:48:58 -0700 (PDT) MIME-Version: 1.0 References: <20190815060718.3286-1-nishkadg.linux@gmail.com> In-Reply-To: <20190815060718.3286-1-nishkadg.linux@gmail.com> From: Linus Walleij Date: Fri, 23 Aug 2019 11:48:46 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: meson: meson: Add of_node_put() before return To: Nishka Dasgupta X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_024903_771735_8B96E4C5 X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , "open list:ARM/Amlogic Meson..." , Linux ARM , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 15, 2019 at 8:07 AM Nishka Dasgupta wrote: > 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. > Issue found with Coccinelle. > > Signed-off-by: Nishka Dasgupta Patch applied with Neil's ACK. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel