mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
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: ddeb66d2cb ("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>
This commit is contained in:
parent
d701782152
commit
58433885ee
1 changed files with 3 additions and 0 deletions
|
|
@ -430,6 +430,9 @@ void nmk_gpio_dbg_show_one(struct seq_file *s, struct pinctrl_dev *pctldev,
|
|||
#ifdef CONFIG_PINCTRL_NOMADIK
|
||||
if (mode == NMK_GPIO_ALT_C && pctldev) {
|
||||
desc = gpio_device_get_desc(chip->gpiodev, offset);
|
||||
if (IS_ERR(desc))
|
||||
return;
|
||||
|
||||
mode = nmk_prcm_gpiocr_get_mode(pctldev, desc_to_gpio(desc));
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue