Commit db2398a5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents a379fbbc c0eee6fb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -256,6 +256,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
			NULL,
			0);

	if (ret) {
		dev_err(dev, "bgpio_init failed\n");
		return ret;
	}

	gc->direction_input = mlxbf2_gpio_direction_input;
	gc->direction_output = mlxbf2_gpio_direction_output;
	gc->ngpio = npins;
+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
	}

	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;

	irq = platform_get_irq(pdev, 0);