gpio fixes for v7.0

- gracefully handle missing regmap in gpio-bd72720
 - fix IRQ resource release in gpio-tegra
 - return -ENOMEM on devm_kzalloc() failure instead of -ENODEV in
   gpio-tegra
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEkeUTLeW1Rh17omX8BZ0uy/82hMMFAmnYsyQACgkQBZ0uy/82
 hMO1zBAAtpp2oB08jEHByAwVR7D/6TF9zcHNXUteEaVI1ZO/hIiE3GVDJ5Omo9RH
 CvfKTnG0MXgFQx6UZUuo21sc25Cmw06NVC0NJ5mA9FA+MSP7o4ujkOn9cVtlbAY4
 rWrtKopmyAfpqiJg07iYND6kY4lPYSNLHcxqS0lXUzCnmpzh+0MoPpTnhA6XfZn1
 D5ruJ9PU6DVscAZ0SOr4G14Y9u62ZHzn5wWTgErMD6KN4sdQu1k8zTlYBb44UDwq
 w2VkBSEnLzYLjhXfOyoneQJrbAmfZy6TKykVfsZ6cffyvtJ5ROvgvrVRXJgym/zM
 T7fcruSadv13MXStpINkwixxQ1y4d9IGsDViwPTVL4a5vFqeD5XYyxrSX8z4u8rR
 StNauZgtW2zGC9wYRbeAqJAlyBu2uxV7ij1nDrcEdt2/9T2LW/5kssjI1XN1vos0
 mDWVHN+0HFJvzEQrjjl9DTy/cCwILXPpYmHJ4U4MFlTcqHkvzIczVw/pTGdpoQgG
 QKNt6HjdrWyGoniVpXw0wH2Njbo/rMYic3NMBXMvZXU9Z/eRKfhqHIyxuN2q3GmL
 1y1w3JLXy/mGqxic1yv3JfxbmfskQe1XP5wl8/6ovOOfB/VMheTimWiMe2Dnf0xM
 xWDzbTwwq5cQEG6y7RL+0RZi1o0bM7HU1I9+VRCjGVYZ5PjNJks=
 =7OtG
 -----END PGP SIGNATURE-----

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

Pull gpio fixes from Bartosz Golaszewski:

 - gracefully handle missing regmap in gpio-bd72720

 - fix IRQ resource release in gpio-tegra

 - return -ENOMEM on devm_kzalloc() failure instead of -ENODEV in
   gpio-tegra

* tag 'gpio-fixes-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: tegra: return -ENOMEM on allocation failure in probe
  gpio: tegra: fix irq_release_resources calling enable instead of disable
  gpio: bd72720: handle missing regmap
This commit is contained in:
Linus Torvalds 2026-04-10 08:32:30 -07:00
commit 017102b40c
2 changed files with 4 additions and 2 deletions

View File

@ -256,6 +256,8 @@ static int gpo_bd72720_probe(struct platform_device *pdev)
g->dev = dev;
g->chip.parent = parent;
g->regmap = dev_get_regmap(parent, NULL);
if (!g->regmap)
return -ENODEV;
return devm_gpiochip_add_data(dev, &g->chip, g);
}

View File

@ -595,7 +595,7 @@ static void tegra_gpio_irq_release_resources(struct irq_data *d)
struct tegra_gpio_info *tgi = gpiochip_get_data(chip);
gpiochip_relres_irq(chip, d->hwirq);
tegra_gpio_enable(tgi, d->hwirq);
tegra_gpio_disable(tgi, d->hwirq);
}
static void tegra_gpio_irq_print_chip(struct irq_data *d, struct seq_file *s)
@ -698,7 +698,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
tgi = devm_kzalloc(&pdev->dev, sizeof(*tgi), GFP_KERNEL);
if (!tgi)
return -ENODEV;
return -ENOMEM;
tgi->soc = of_device_get_match_data(&pdev->dev);
tgi->dev = &pdev->dev;