mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.6 01/16] pinctrl: renesas: rza2: Fix potential NULL pointer dereference
@ 2025-04-04  0:06 Sasha Levin
  2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 02/16] MIPS: cm: Detect CM quirks from device tree Sasha Levin
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Sasha Levin @ 2025-04-04  0:06 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Chenyuan Yang, Geert Uytterhoeven, Matthias Brugger, Sasha Levin,
	linus.walleij, linux-renesas-soc, linux-gpio

From: Chenyuan Yang <chenyuan0y@gmail.com>

[ Upstream commit f752ee5b5b86b5f88a5687c9eb0ef9b39859b908 ]

`chip.label` in rza2_gpio_register() could be NULL.
Add the missing check.

Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/20250210232552.1545887-1-chenyuan0y@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/renesas/pinctrl-rza2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pinctrl/renesas/pinctrl-rza2.c b/drivers/pinctrl/renesas/pinctrl-rza2.c
index 990b96d459671..c5dc63d9bd3fc 100644
--- a/drivers/pinctrl/renesas/pinctrl-rza2.c
+++ b/drivers/pinctrl/renesas/pinctrl-rza2.c
@@ -243,6 +243,9 @@ static int rza2_gpio_register(struct rza2_pinctrl_priv *priv)
 	int ret;
 
 	chip.label = devm_kasprintf(priv->dev, GFP_KERNEL, "%pOFn", np);
+	if (!chip.label)
+		return -ENOMEM;
+
 	chip.parent = priv->dev;
 	chip.ngpio = priv->npins;
 
-- 
2.39.5


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-04-04  0:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-04  0:06 [PATCH AUTOSEL 6.6 01/16] pinctrl: renesas: rza2: Fix potential NULL pointer dereference Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 02/16] MIPS: cm: Detect CM quirks from device tree Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 03/16] crypto: ccp - Add support for PCI device 0x1134 Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 04/16] crypto: null - Use spin lock instead of mutex Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 05/16] HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 06/16] bpf: Fix deadlock between rcu_tasks_trace and event_mutex Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 07/16] clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec() Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 08/16] parisc: PDT: Fix missing prototype warning Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 09/16] s390/sclp: Add check for get_zeroed_page() Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 10/16] s390/tty: Fix a potential memory leak bug Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 11/16] bpf: bpftool: Setting error code in do_loader() Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 12/16] bpf: Only fails the busy counter check in bpf_cgrp_storage_get if it creates storage Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 13/16] bpf: Reject attaching fexit/fmod_ret to __noreturn functions Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 14/16] x86/Kconfig: Make CONFIG_PCI_CNB20LE_QUIRK depend on X86_32 Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 15/16] mailbox: pcc: Fix the possible race in updation of chan_in_use flag Sasha Levin
2025-04-04  0:06 ` [PATCH AUTOSEL 6.6 16/16] mailbox: pcc: Always clear the platform ack interrupt first Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®