[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZkHNFQwvzjNJbYt4@duo.ucw.cz>
Date: Mon, 13 May 2024 10:19:33 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Matti Vaittinen <mazziesaccount@...il.com>,
Mark Brown <broonie@...nel.org>, lgirdwood@...il.com
Subject: Re: [PATCH AUTOSEL 6.1 02/25] regulator: irq_helpers: duplicate IRQ
name
Hi!
> The regulator IRQ helper requires caller to provide pointer to IRQ name
> which is kept in memory by caller. All other data passed to the helper
> in the regulator_irq_desc structure is copied. This can cause some
> confusion and unnecessary complexity.
>
> Make the regulator_irq_helper() to copy also the provided IRQ name
> information so caller can discard the name after the call to
> regulator_irq_helper() completes.
Does this fix a bug in 6.1? It looks like preparation...
Best regards,
Pavel
> +++ b/drivers/regulator/irq_helpers.c
> @@ -352,6 +352,9 @@ void *regulator_irq_helper(struct device *dev,
>
> h->irq = irq;
> h->desc = *d;
> + h->desc.name = devm_kstrdup(dev, d->name, GFP_KERNEL);
> + if (!h->desc.name)
> + return ERR_PTR(-ENOMEM);
>
> ret = init_rdev_state(dev, h, rdev, common_errs, per_rdev_errs,
> rdev_amount);
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists