Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1633475img; Wed, 27 Feb 2019 02:49:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYTbbNsYQfBh8gBMMmH/ECs/fc1gLUxABZTWIE1REczuS/hdQSKEgJkDImW1v2TS7hUzHh5 X-Received: by 2002:aa7:928d:: with SMTP id j13mr1017080pfa.112.1551264572804; Wed, 27 Feb 2019 02:49:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551264572; cv=none; d=google.com; s=arc-20160816; b=KnEFHl8cBwK+ra86ykS9eGun7odQEBIH7GZLgXMBu+fmHwoI1zyjtjGPtCvteuhVh/ gnwU6dJL/ilSEUo9v8ytWwMXAJg/U7LIJkk7ifKaXzy6ONKlBUVPESQAbaf3lqcLdV2G 4yNuk+p8iBpHZwu9Bct1Sj5LUovGXpt2EyO3QkVVcC9zJrGMhVRR5mQA24cPOqL8wAJc Qja0mRFELYwMcGvRDZHuCuZtn2gyV7OSsdqpaPdnBwQ6thuNOM1L248JhIIKxxtgLNHl qIAntk9fTzzfa3pdfkPZLhzxWyXW4pKmUbE4HeOrdElhwfbwNEotNG+OzkYHJW0oKP5W QHNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=bAyqaqET+lrXNBuVom0a7Mdg0P0ORGnE7iTubSw+dYY=; b=lW3n7lLRD0erdNpO3FCEo7SeTViYxuAQ6lGRyeLlNKHdU+eNXEaAiOzrRpiphml4Bb +aNKv87jidzy2QChWaComm7Y1NQr/ekVKAyzY0j4VeYtnV/q9y9QEjqSosYhcIIJzn7w WPoFfCHmN0lpqHSdxp0JJkCMqZLuaAqTPRyIlcsH9wIBoftDdMBzDb5F4uulBkMv6z6q 2fPg9StWFbuO2YWhZ3z82KiGhe9DFB0WBbm4X4d0o1Rl0/VZRrfz2fjOLhrVLWXZoPxy kF2Vpa6e6FOLmiR9MNb7zzf1jy2ruZ40GKwvUYPpj3AsRM3izQvtv1JQSVoHgU/aQIYx pn+g== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc12si14391604plb.13.2019.02.27.02.49.17; Wed, 27 Feb 2019 02:49:32 -0800 (PST) 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; 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 S1728462AbfB0KrV (ORCPT + 99 others); Wed, 27 Feb 2019 05:47:21 -0500 Received: from mail-vk1-f195.google.com ([209.85.221.195]:44042 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbfB0KrV (ORCPT ); Wed, 27 Feb 2019 05:47:21 -0500 Received: by mail-vk1-f195.google.com with SMTP id w85so1844635vkw.11; Wed, 27 Feb 2019 02:47:20 -0800 (PST) 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=bAyqaqET+lrXNBuVom0a7Mdg0P0ORGnE7iTubSw+dYY=; b=MzYCWniu5y0Dnfn11IS9IXjfXXMdKy9IOhQUrDn68c2uuRhOaxKTq1To2WadijUxXj 47BjSMQsvkxAZX0cniztW7BvXowlOI3ePNGL20EIrZzd6RXeapICXMTCOW6lVdM5vmnG ZKaeB5ZIHcxa7g3a3/zQn7XSSOK6J9j0poMa9qeY0OZXlKr0YDJIUGCwfBAXHLFBw3Aj b+HojPJMFZmi8k9zE34VtRcm9y3TR9Wd54JpWB2XXAm9j3l1s0PD5FPW+hTorNjtnS4c A0rloSypu1djZM3Nv1IblKfSlUD/U0w7QOq1gmuvQFzgXDG8id3KdqejaJh+OnqI50Vp Eyxg== X-Gm-Message-State: AHQUAuZjnUjQM2uQiXGsD7kcpbFiNhFZ1eHjR0uw8ZgH+ATHMX+eHXUR 9scTYpIqZt/+T1SSHG6q5gyFFN2gqbCkwp8jMP4= X-Received: by 2002:a1f:95d5:: with SMTP id x204mr275126vkd.72.1551264440394; Wed, 27 Feb 2019 02:47:20 -0800 (PST) MIME-Version: 1.0 References: <1551250826-10302-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> In-Reply-To: <1551250826-10302-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> From: Geert Uytterhoeven Date: Wed, 27 Feb 2019 11:47:08 +0100 Message-ID: Subject: Re: [PATCH] phy: renesas: rcar-gen2: Fix memory leak at error paths To: Yoshihiro Shimoda Cc: Kishon Vijay Abraham I , Julia Lawall , Linux Kernel Mailing List , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shimoda-san, On Wed, Feb 27, 2019 at 8:00 AM Yoshihiro Shimoda wrote: > This patch fixes memory leak at error paths of the probe function. > In for_each_child_of_node, if the loop returns, the driver should > call of_put_node() before returns. > > Reported-by: Julia Lawall > Fixes: 1233f59f745 ("phy: Renesas R-Car Gen2 PHY driver") > Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven 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