+7
−1
Loading
If the memory allocation in gpiolib_seq_start() fails, the s->private field remains uninitialized and is later dereferenced without checking in gpiolib_seq_stop(). Initialize s->private to NULL before calling kzalloc() and check it before dereferencing it. Fixes: e348544f ("gpio: protect the list of GPIO devices with SRCU") Reviewed-by:Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20251103141132.53471-1-brgl@bgdev.pl Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>