Skip to content

Commit 5843388

Browse files
Ethan TidmoreBartosz Golaszewski
authored andcommitted
gpio: nomadik: Add missing IS_ERR() check
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>
1 parent d701782 commit 5843388

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)