linux/drivers/gpio
Andy Shevchenko 7b4aebeecb gpiolib: Fix crash on error in gpiochip_get_ngpios()
The gpiochip_get_ngpios() uses chip_*() macros to print messages.
However these macros rely on gpiodev to be initialised and set,
which is not the case when called via bgpio_init(). In such a case
the printing messages will crash on NULL pointer dereference.
Replace chip_*() macros by the respective dev_*() ones to avoid
such crash.

Fixes: 55b2395e4e ("gpio: mmio: handle "ngpios" properly in bgpio_init()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250213155646.2882324-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-02-13 18:51:39 +01:00
..
Kconfig gpio: GPIO_GRGPIO should depend on OF 2025-02-05 14:37:53 +01:00
Makefile gpio: mpfs: add polarfire soc gpio support 2024-11-06 14:40:08 +01:00
TODO
gpio-74x164.c
gpio-74xx-mmio.c
gpio-104-dio-48e.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-104-idi-48.c
gpio-104-idio-16.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-adnp.c
gpio-adp5520.c
gpio-adp5585.c
gpio-aggregator.c
gpio-altera-a10sr.c
gpio-altera.c gpio: altera: Drop .mapped_irq from driver data 2025-01-13 09:20:25 +01:00
gpio-amd-fch.c
gpio-amd8111.c
gpio-amdpt.c
gpio-arizona.c
gpio-aspeed-sgpio.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-aspeed.c Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
gpio-ath79.c
gpio-bcm-kona.c gpio: bcm-kona: Add missing newline to dev_err format string 2025-02-11 09:46:59 +01:00
gpio-bd9571mwv.c
gpio-bd71815.c
gpio-bd71828.c
gpio-brcmstb.c
gpio-bt8xx.c
gpio-cadence.c
gpio-cgbc.c
gpio-clps711x.c
gpio-creg-snps.c
gpio-cros-ec.c
gpio-crystalcove.c
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-dln2.c
gpio-ds4520.c
gpio-dwapb.c
gpio-eic-sprd.c
gpio-elkhartlake.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-em.c
gpio-en7523.c
gpio-ep93xx.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-exar.c gpio: exar: set value when external pull-up or pull-down is present 2024-11-21 09:08:47 +01:00
gpio-f7188x.c
gpio-ftgpio010.c
gpio-fxl6408.c
gpio-ge.c
gpio-gpio-mm.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-graniterapids.c gpio: graniterapids: Fix GPIO Ack functionality 2024-12-10 10:35:13 +01:00
gpio-grgpio.c gpio: grgpio: Add NULL check in grgpio_probe 2024-11-18 11:45:06 +01:00
gpio-gw-pld.c
gpio-hisi.c
gpio-hlwd.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-htc-egpio.c
gpio-i8255.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-i8255.h
gpio-ich.c
gpio-idio-16.c gpio: idio-16: Actually make use of the GPIO_IDIO_16 symbol namespace 2024-12-10 11:38:57 +01:00
gpio-idio-16.h
gpio-idt3243x.c
gpio-imx-scu.c
gpio-it87.c
gpio-ixp4xx.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-latch.c
gpio-ljca.c Linux 6.13-rc2 2024-12-10 11:38:38 +01:00
gpio-logicvc.c
gpio-loongson-64bit.c gpio: loongson: Fix Loongson-2K2000 ACPI GPIO register offset 2025-01-08 09:54:20 +01:00
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c
gpio-madera.c
gpio-max730x.c
gpio-max732x.c
gpio-max3191x.c
gpio-max7300.c
gpio-max7301.c
gpio-max77620.c
gpio-max77650.c
gpio-mb86s7x.c
gpio-mc33880.c
gpio-menz127.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-merrifield.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-ml-ioh.c
gpio-mlxbf.c
gpio-mlxbf2.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-mlxbf3.c
gpio-mm-lantiq.c
gpio-mmio.c
gpio-mockup.c
gpio-moxtet.c
gpio-mpc8xxx.c gpio: mpc8xxx: Add MPC8314 support 2025-01-13 09:20:25 +01:00
gpio-mpc5200.c
gpio-mpfs.c gpio: mpfs: add CoreGPIO support 2024-11-13 16:29:27 +01:00
gpio-mpsse.c gpio: mpsse: Remove usage of the deprecated ida_simple_xx() API 2024-11-22 15:23:31 +01:00
gpio-msc313.c
gpio-mt7621.c
gpio-mvebu.c
gpio-mxc.c gpio: mxc: remove dead code after switch to DT-only 2025-01-23 08:44:51 +01:00
gpio-mxs.c
gpio-nomadik.c
gpio-npcm-sgpio.c
gpio-octeon.c
gpio-omap.c Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
gpio-palmas.c
gpio-pca953x.c gpio: pca953x: Improve interrupt support 2025-02-04 21:21:03 +01:00
gpio-pca9570.c
gpio-pcf857x.c
gpio-pch.c
gpio-pci-idio-16.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-pcie-idio-24.c gpio: pcie-idio-24: Replace deprecated PCI functions 2024-11-04 09:15:38 +01:00
gpio-pisosr.c
gpio-pl061.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-pmic-eic-sprd.c
gpio-pxa.c
gpio-raspberrypi-exp.c
gpio-rc5t583.c
gpio-rcar.c
gpio-rda.c
gpio-rdc321x.c
gpio-realtek-otto.c
gpio-reg.c
gpio-regmap.c gpio: regmap: Use generic request/free ops 2025-01-13 09:20:25 +01:00
gpio-rockchip.c gpio: rockchip: support new version GPIO 2024-11-12 13:51:25 +01:00
gpio-rtd.c
gpio-sa1100.c
gpio-sama5d2-piobu.c
gpio-sch.c
gpio-sch311x.c
gpio-sifive.c
gpio-sim.c gpio: sim: lock hog configfs items if present 2025-02-05 14:37:01 +01:00
gpio-siox.c
gpio-sl28cpld.c
gpio-sloppy-logic-analyzer.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c
gpio-stmpe.c gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock 2025-02-12 10:52:56 +01:00
gpio-stp-xway.c
gpio-syscon.c
gpio-tangier.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpio-tangier.h
gpio-tb10x.c
gpio-tc3589x.c
gpio-tegra.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-tegra186.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-thunderx.c
gpio-timberdale.c
gpio-tn48m.c
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65219.c gpio: tps65219: Use existing kernel gpio macros 2024-12-20 14:44:24 +01:00
gpio-tps65910.c
gpio-tps65912.c
gpio-tps68470.c
gpio-tqmx86.c gpio: tqmx86: add support for changing GPIO directions 2024-12-16 10:00:46 +01:00
gpio-ts4800.c
gpio-ts4900.c
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c gpio: twl4030: use gpiochip_get_data 2024-12-05 13:14:44 +01:00
gpio-uniphier.c
gpio-vf610.c
gpio-viperboard.c
gpio-virtio.c
gpio-virtuser.c gpio: virtuser: lock up configfs that an instantiated device depends on 2025-01-03 17:15:04 +01:00
gpio-visconti.c Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
gpio-vx855.c
gpio-wcd934x.c
gpio-wcove.c
gpio-winbond.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-ws16c48.c
gpio-xgene-sb.c
gpio-xgene.c
gpio-xgs-iproc.c Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
gpio-xilinx.c gpio: xilinx: Convert gpio_lock to raw spinlock 2025-01-14 14:04:38 +01:00
gpio-xlp.c
gpio-xra1403.c
gpio-xtensa.c
gpio-zevio.c gpio: zevio: Add missed label initialisation 2024-11-21 09:06:17 +01:00
gpio-zynq.c
gpio-zynqmp-modepin.c
gpiolib-acpi.c gpiolib: acpi: Add a quirk for Acer Nitro ANV14 2025-02-12 10:06:47 +01:00
gpiolib-acpi.h
gpiolib-cdev.c gpiolib: cdev: use !mem_is_zero() instead of memchr_inv(s, 0, n) 2024-11-12 09:46:17 +01:00
gpiolib-cdev.h
gpiolib-devres.c
gpiolib-legacy.c gpio: Get rid of GPIOF_ACTIVE_LOW 2024-11-09 14:55:33 +01:00
gpiolib-of.c gpio: Use of_property_present() for non-boolean properties 2024-11-06 14:41:06 +01:00
gpiolib-of.h
gpiolib-swnode.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gpiolib-swnode.h
gpiolib-sysfs.c gpio: sysfs: emit chardev line-state events on edge store 2024-11-04 08:56:20 +01:00
gpiolib-sysfs.h
gpiolib.c gpiolib: Fix crash on error in gpiochip_get_ngpios() 2025-02-13 18:51:39 +01:00
gpiolib.h