提交 db2398a5 编写于 作者: L Linus Torvalds

Merge tag 'gpio-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix the return value check when parsing the ngpios property in
   gpio-xgs-iproc

 - check the return value of bgpio_init() in gpio-mlxbf2

* tag 'gpio-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: mlxbf2.c: Add check for bgpio_init failure
  gpio: xgs-iproc: fix parsing of ngpios property
...@@ -256,6 +256,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev) ...@@ -256,6 +256,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
NULL, NULL,
0); 0);
if (ret) {
dev_err(dev, "bgpio_init failed\n");
return ret;
}
gc->direction_input = mlxbf2_gpio_direction_input; gc->direction_input = mlxbf2_gpio_direction_input;
gc->direction_output = mlxbf2_gpio_direction_output; gc->direction_output = mlxbf2_gpio_direction_output;
gc->ngpio = npins; gc->ngpio = npins;
......
...@@ -224,7 +224,7 @@ static int iproc_gpio_probe(struct platform_device *pdev) ...@@ -224,7 +224,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
} }
chip->gc.label = dev_name(dev); chip->gc.label = dev_name(dev);
if (of_property_read_u32(dn, "ngpios", &num_gpios)) if (!of_property_read_u32(dn, "ngpios", &num_gpios))
chip->gc.ngpio = num_gpios; chip->gc.ngpio = num_gpios;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册