Missing null check in rza2_gpio_register
henry writes via Kernel.org Bugzilla:
pinctrl: renesas: rza2: Add null check in the rza2_gpio_register
When devm_kasprintf fails, it returns a null pointer. However, this return value is not properly checked in the function rza2_gpio_register.
A check should be added after the devm_kasprintf call to prevent potential null pointer dereference issues.
CODE:
chip.label = devm_kasprintf(priv->dev, GFP_KERNEL, "%pOFn", np); chip.parent = priv->dev; chip.ngpio = priv->npins;
View: https://bugzilla.kernel.org/show_bug.cgi?id=219946#c0
You can reply to this message to join the discussion.
Signature · 2 lines
Deet-doot-dot, I am a bot. Kernel.org Bugzilla (bugspray 0.1-dev)
Andy Shevchenko writes via Kernel.org Bugzilla:
Alredy fixed in the https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pinctrl/renesas/pinctrl-rza2.c?id=f752ee5b5b86b5f88a5687c9eb0ef9b39859b908.
View: https://bugzilla.kernel.org/show_bug.cgi?id=219946#c1
You can reply to this message to join the discussion.
Signature · 2 lines
Deet-doot-dot, I am a bot. Kernel.org Bugzilla (bugspray 0.1-dev)