This is a note to let you know that I've just added the patch titled mfd: tps6594: Add null pointer check to tps6594_device_init() to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mfd-tps6594-add-null-pointer-check-to-tps6594_device.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 86c0958e57bae54bf54fface639027c929d2c3f0 Author: Kunwu Chan <chentao@xxxxxxxxxx> Date: Fri Dec 8 11:33:20 2023 +0800 mfd: tps6594: Add null pointer check to tps6594_device_init() [ Upstream commit 825906f2ebe83977d747d8bce61675dddd72485d ] devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 325bec7157b3 ("mfd: tps6594: Add driver for TI TPS6594 PMIC") Suggested-by: Lee Jones <lee@xxxxxxxxxx> Signed-off-by: Kunwu Chan <chentao@xxxxxxxxxx> Link: https://lore.kernel.org/r/20231208033320.49345-1-chentao@xxxxxxxxxx Signed-off-by: Lee Jones <lee@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/mfd/tps6594-core.c b/drivers/mfd/tps6594-core.c index 0fb9c5cf213a..783ee59901e8 100644 --- a/drivers/mfd/tps6594-core.c +++ b/drivers/mfd/tps6594-core.c @@ -433,6 +433,9 @@ int tps6594_device_init(struct tps6594 *tps, bool enable_crc) tps6594_irq_chip.name = devm_kasprintf(dev, GFP_KERNEL, "%s-%ld-0x%02x", dev->driver->name, tps->chip_id, tps->reg); + if (!tps6594_irq_chip.name) + return -ENOMEM; + ret = devm_regmap_add_irq_chip(dev, tps->regmap, tps->irq, IRQF_SHARED | IRQF_ONESHOT, 0, &tps6594_irq_chip, &tps->irq_data); if (ret)