Skip to content

Commit 77160c3

Browse files
Ethan TidmoreSasha Levin
authored andcommitted
gpio: nomadik: Add missing IS_ERR() check
[ Upstream commit 5843388 ] The function gpio_device_get_desc() can return an error pointer and is not checked for one. Add check for error pointer. Fixes: ddeb66d ("gpio: nomadik: don't print out global GPIO numbers in debugfs callbacks") Cc: stable@vger.kernel.org Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260214044531.43539-1-ethantidmore06@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c99e160 commit 77160c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpio/gpio-nomadik.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ void nmk_gpio_dbg_show_one(struct seq_file *s, struct pinctrl_dev *pctldev,
430430
#ifdef CONFIG_PINCTRL_NOMADIK
431431
if (mode == NMK_GPIO_ALT_C && pctldev) {
432432
desc = gpio_device_get_desc(chip->gpiodev, offset);
433+
if (IS_ERR(desc))
434+
return;
435+
433436
mode = nmk_prcm_gpiocr_get_mode(pctldev, desc_to_gpio(desc));
434437
}
435438
#endif

0 commit comments

Comments
 (0)