mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, uwu@icenowy.me
Cc: stable@vger.kernel.org, patches@lists.linux.dev,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org,
	patches@kernelci.org, lkft-triage@lists.linaro.org,
	pavel@denx.de, jonathanh@nvidia.com, f.fainelli@gmail.com,
	sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de,
	conor@kernel.org, hargar@microsoft.com, broonie@kernel.org
Subject: Re: [PATCH 6.1 00/98] 6.1.117-rc1 review
Date: Thu, 28 Nov 2024 19:05:20 +0100	[thread overview]
Message-ID: <Z0iw4Hwltov+x89b@duo.ucw.cz> (raw)
In-Reply-To: <20241112101844.263449965@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

Hi!

> Icenowy Zheng <uwu@icenowy.me>
>     thermal/of: support thermal zones w/o trips subnode

This seems to introduce memory leak.

+++ b/drivers/thermal/thermal_of.c
@@ -238,18 +238,15 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np
, int *n
...     
        trips = of_get_child_by_name(np, "trips");
-       if (!trips) {
-               pr_err("Failed to find 'trips' node\n");
-               return ERR_PTR(-EINVAL);
-       }
+       if (!trips)
+               return NULL;
 
        count = of_get_child_count(trips);
-       if (!count) {
-               pr_err("No trip point defined\n");
-               ret = -EINVAL;
-               goto out_of_node_put;
-       }
+       if (!count)
+               return NULL;


In the !count case, we still need to do the of_node_put, AFAICT.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      parent reply	other threads:[~2024-11-28 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 10:20 Greg Kroah-Hartman
2024-11-12 20:56 ` Pavel Machek
2024-11-12 23:17 ` Shuah Khan
2024-11-13  0:22 ` Florian Fainelli
2024-11-13  0:38 ` Ron Economos
2024-11-13 11:23 ` Naresh Kamboju
2024-11-13 13:29 ` Mark Brown
2024-11-13 18:35 ` Peter Schneider
2024-11-13 19:58 ` Jon Hunter
2024-11-14 10:50 ` [PATCH 6.1] " Hardik Garg
2024-11-28 18:05 ` Pavel Machek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z0iw4Hwltov+x89b@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=conor@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hargar@microsoft.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=patches@kernelci.org \
    --cc=patches@lists.linux.dev \
    --cc=rwarsow@gmx.de \
    --cc=shuah@kernel.org \
    --cc=srw@sladewatkins.net \
    --cc=stable@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=uwu@icenowy.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®