diff options
| author | Andy Shevchenko <[email protected]> | 2025-02-13 15:56:46 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2025-02-13 17:51:39 +0000 |
| commit | 7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44 (patch) | |
| tree | cddddaeb90f96da7969281f30093ac2d552e5e28 /net/unix/garbage.c | |
| parent | gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock (diff) | |
| download | kernel-7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44.tar.gz kernel-7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44.zip | |
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: 55b2395e4e92 ("gpio: mmio: handle "ngpios" properly in bgpio_init()")
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions
