gpio fixes for v5.17-rc1

- fix the error checks of platform_get_irq() in gpio-mpc8xxx and gpio-idt3243x
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmHpcRsACgkQEacuoBRx
 13JtiRAAmHU3popEtD8UDiibc9UT/zstPgVKq2SgvJQzg8cAPyC97c8uETee9STZ
 kLzdrK+VMP1munb+hOT1yl0FXcU1IceDztFoJUZVfctTDnqam1lS/yYnGCnapNUA
 xdM9qqyCxYNfLSdrM0h5QUtL90f87MVLsvrrpG3vx1jR3ZSdB9pdVfDe3Av0RX0p
 0K5Pn48m4csFyti00NKkM0RGrPZJEuJY5jhZuz1/7S6Yt8077jjiSzYL1R3NOtDz
 eA7qMzPW/ZuGJfTQ/tr4MT0zggs6LrXTdnVqThvclpFxlA3RBEAw6mMUpT5/Ickn
 2MaaOzIEk82b7ndQDira2pHoT2I9LSZcQSKhHypWO2Azi8R7E7M+2et0/qYaKhZW
 n30PJopfUZ8tQp42RBPEF9nrybQZKYGBp+okBbCNDRFnmnQuSadkvuBO9Glf0y4Q
 nAwOMIsQh5A6xVqNwEK+pfDzAQ6FURCdGeAm8dTllKc67rXnVTikUQUZnILyTzj0
 lMGJEfxSNE/34lbb0NWHb36xjdY+JYxo/N2P8XIYRCFeR3oDfqSUTBmG+aON3Jn6
 6VyFAmFkfRlzBS2vmmbWkHCOxqYER6ubOOb1Hz4LcPrxeCg1E/toClkDmCC2+dDH
 UNDEKei0tExqzm09mGBCE+q3ligIG3M/VwnYo5ekXRhDbuf6AGQ=
 =il0X
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2022-01-20 17:38:23 +02:00
commit 2c271fe77d
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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,