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.7 required=3.0 tests=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 11DB5C3A59C for ; Fri, 16 Aug 2019 07:27:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0B4E20644 for ; Fri, 16 Aug 2019 07:27:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfHPH1I (ORCPT ); Fri, 16 Aug 2019 03:27:08 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:43748 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbfHPH1I (ORCPT ); Fri, 16 Aug 2019 03:27:08 -0400 Received: by mail-oi1-f196.google.com with SMTP id y8so4140099oih.10 for ; Fri, 16 Aug 2019 00:27:07 -0700 (PDT) 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=YYn06rQVCWr/xHbuls3eexeoV5PBFYW4r8q5eGYJO9w=; b=WcugUG5W/eCkqiAr8R0dBEketLucDRFoRrUQycvWqI7G5LqspBJ1Dv5eJwcbyrLQFn NkQY2zzkGhFNKG7+LOnCR7hbJGNThYsXc+EMnMdD4kZ4JiDNzxB2OS96mN9USOesCd08 4qibd/DK7UjSZN0Qkwf8FPdgwRiMhy/7uyKnZZUylJc6xOFODb+wjrr18BH2THiOxjlb SCuo1zRFS/+zuPnb47B3bCgB0U5B2xy6WQjMjE/UOoKOuDsw9KdkaXkLV2/+A9Y6XP4j ODX3goJbAQaeduxZXcom/U19Fc7Fovmhql47O2MbMsTYvmj7SutjRhTsG6wPFabyP+Zi hOyw== X-Gm-Message-State: APjAAAUnPCHoo+tJRB9xypb3opEtFXSD3EsYUHjzYawgMo9S3gT67see iy3rMGGr0gyiP654jdukMtWvjfKVF+JETbBOGys= X-Google-Smtp-Source: APXvYqwDDr7GscejpmuVIN6KpfEjd5gflUcN0RNsaX5RphMhs11TXPMJjVMpu6sEAyRJjfgO7z6Vf/gJdFitvbT5XsA= X-Received: by 2002:a05:6808:3c5:: with SMTP id o5mr4252277oie.102.1565940427050; Fri, 16 Aug 2019 00:27:07 -0700 (PDT) MIME-Version: 1.0 References: <20190815061355.4415-1-nishkadg.linux@gmail.com> In-Reply-To: <20190815061355.4415-1-nishkadg.linux@gmail.com> From: Geert Uytterhoeven Date: Fri, 16 Aug 2019 09:26:55 +0200 Message-ID: Subject: Re: [PATCH] soc: renesas: rcar-sysc: Add goto to of_node_put() before return To: Nishka Dasgupta Cc: Simon Horman , Geert Uytterhoeven , Magnus Damm , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Thanks, applied and queued for v5.4.On Thu, Aug 15, 2019 at 8:14 AM Nishka Dasgupta wrote: > The local variable np in function rcar_sysc_pd_init takes the return > value of of_find_matching_node_and_match, which gets a node but does not > put it. If np is not put before the function returns, it may cause a > memory leak. Hence, remove the return statement that does not > immediately follow a putting of np. Replace it with a goto pointing to a > pre-existing label that first puts np and then returns the required > value. > Issue found with Coccinelle. > > Signed-off-by: Nishka Dasgupta Fixes: afa6f53df6052968 ("soc: renesas: rcar-sysc: Add support for fixing up power area tables") Reviewed-by: Geert Uytterhoeven i.e. will queue in renesas-devel for v5.4. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds