Linux LED subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sasha Levin" <sashal@kernel.org>
Cc: linux-leds@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH linux-next] leds: netxbig: drop the second allocation of the leds array
Date: Tue, 01 Dec 2026 15:59:05 +0000	[thread overview]
Message-ID: <sashiko-outbox-243631@kernel.org> (raw)
In-Reply-To: <20261201155641.717600-1-sashal@kernel.org>

> Since next-20261120 the merge of the leds-lj tree with the origin tree
> allocates the leds array in netxbig_leds_get_of_pdata() twice:
> 
> 	leds = devm_kzalloc_objs(dev, *leds, num_leds);
> 	leds = devm_kcalloc(dev, num_leds, sizeof(*leds), GFP_KERNEL);
> 	if (!leds)
> 		return -ENOMEM;
> 
> The first line is the origin side, from commit 4dd10fbbeb9c ("treewide:
> Convert devm_kmalloc() family to the devm_kmalloc_obj() family"). The
> second is the leds-lj side: commit 41ea2c75f886 ("leds: netxbig: Fix
> platform device reference leak on successful probe") only changed the
> error path below it. The first array is never used and stays allocated
> until the device is unbound.
> 
> Keep the devm_kzalloc_objs() call and drop the devm_kcalloc() one, as
> the merge does for the other allocations in this function.
> 
> Fixes: 7fa58f4b0c86 ("Merge branch 'for-leds-next' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git")
> Link: https://lore.kernel.org/all/c05653b5-c8bd-46ca-aaf5-281e8d74f1e6@sirena.org.uk/
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201155641.717600-1-sashal@kernel.org?part=1

      reply	other threads:[~2026-12-01 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 15:56 [PATCH linux-next] leds: netxbig: drop the second allocation of the leds array Sasha Levin
2026-12-01 15:59 ` sashiko-bot [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=sashiko-outbox-243631@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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