regulator: fixed-helper: Save a few bytes of memory when registering a 'nfc_llc'...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 20 Jan 2024 11:03:26 +0000 (12:03 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 22 Jan 2024 17:56:32 +0000 (17:56 +0000)
commit4c716711a5c5e89202facc9ca816bc89d4b8c745
treec06408fb3e0b393071090eaa02bf5e2d3fb78a94
parenta6ffa02ba7a28fe1bba06eacb224554d89a1cd4d
regulator: fixed-helper: Save a few bytes of memory when registering a 'nfc_llc' engine

regulator_register_always_on() calls pass a string literal as the 'name'
parameter.

So kstrdup_const() can be used instead of kfree() to avoid a memory
allocation in such cases.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://msgid.link/r/3f990a7b80d72c31371735b24ed08acbb8392c80.1705748586.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/fixed-helper.c