mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07: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:
committed by
Bartosz Golaszewski
parent
d701782152
commit
58433885ee
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user