Commit 2c271fe7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull gpio fixes from Bartosz Golaszewski:
 "Fix the same error check issue in two drivers. And then the drivers
  are fixed even more because the first patches were incomplete which I
  missed.

  Summary:

   - fix the error checks of platform_get_irq() in gpio-mpc8xxx and
     gpio-idt3243x"

* tag 'gpio-fixes-for-v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: mpc8xxx: Fix an ignored error return from platform_get_irq()
  gpio: idt3243x: Fix an ignored error return from platform_get_irq()
  gpio: idt3243x: Fix IRQ check in idt_gpio_probe
  gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe
parents 64f29d88 9f51ce0b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static int idt_gpio_probe(struct platform_device *pdev)
	struct device *dev = &pdev->dev;
	struct gpio_irq_chip *girq;
	struct idt_gpio_ctrl *ctrl;
	unsigned int parent_irq;
	int parent_irq;
	int ngpios;
	int ret;

@@ -164,8 +164,8 @@ static int idt_gpio_probe(struct platform_device *pdev)
			return PTR_ERR(ctrl->pic);

		parent_irq = platform_get_irq(pdev, 0);
		if (!parent_irq)
			return -EINVAL;
		if (parent_irq < 0)
			return parent_irq;

		girq = &ctrl->gc.irq;
		girq->chip = &idt_gpio_irqchip;
+3 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ struct mpc8xxx_gpio_chip {
				unsigned offset, int value);

	struct irq_domain *irq;
	unsigned int irqn;
	int irqn;
};

/*
@@ -388,8 +388,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)
	}

	mpc8xxx_gc->irqn = platform_get_irq(pdev, 0);
	if (!mpc8xxx_gc->irqn)
		return 0;
	if (mpc8xxx_gc->irqn < 0)
		return mpc8xxx_gc->irqn;

	mpc8xxx_gc->irq = irq_domain_create_linear(fwnode,
						   MPC8XXX_GPIO_PINS,