All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	linux-leds@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	Angelo Gioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Lee Jones <lee@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Pavel Machek <pavel@ucw.cz>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH] leds: mt6360: fix memory leak in mt6360_init_isnk_properties()
Date: Tue, 11 Jun 2024 16:01:49 +0200	[thread overview]
Message-ID: <010b1c91-fbde-4b01-a92e-8c14751c7699@web.de> (raw)
In-Reply-To: <20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com>

…
> Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
> in the error paths.

I suggest to apply a goto chain for a while.
https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources

Will the application of scope-based resource management become feasible with another delay?
https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/cleanup.h#L8

Regards,
Markus

WARNING: multiple messages have this Message-ID (diff)
From: Markus Elfring <Markus.Elfring@web.de>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	linux-leds@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	Angelo Gioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Lee Jones <lee@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Pavel Machek <pavel@ucw.cz>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH] leds: mt6360: fix memory leak in mt6360_init_isnk_properties()
Date: Tue, 11 Jun 2024 16:01:49 +0200	[thread overview]
Message-ID: <010b1c91-fbde-4b01-a92e-8c14751c7699@web.de> (raw)
In-Reply-To: <20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com>

…
> Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
> in the error paths.

I suggest to apply a goto chain for a while.
https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources

Will the application of scope-based resource management become feasible with another delay?
https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/cleanup.h#L8

Regards,
Markus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-06-11 14:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 22:40 [PATCH] leds: mt6360: fix memory leak in mt6360_init_isnk_properties() Javier Carrasco
2024-06-10 22:40 ` Javier Carrasco
2024-06-11 14:01 ` Markus Elfring [this message]
2024-06-11 14:01   ` Markus Elfring
2024-06-11 14:12   ` Javier Carrasco
2024-06-11 14:12     ` Javier Carrasco
2024-06-12  7:55   ` Greg KH
2024-06-13 17:18 ` (subset) " Lee Jones

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=010b1c91-fbde-4b01-a92e-8c14751c7699@web.de \
    --to=markus.elfring@web.de \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.