]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpio: sim: Initialize attribute allocated on the heap
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 8 Apr 2021 15:55:06 +0000 (18:55 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 9 Apr 2021 08:02:19 +0000 (10:02 +0200)
commitb50d6d30703d5c8475be09367cc3747bf53b5c0c
treec1ac22a355fc79f5824ad09cc6cf2f56558d5401
parente1b7033ecdac56c1cc4dff72d67cac25d449efc6
gpio: sim: Initialize attribute allocated on the heap

The attributes on the heap must be initialized before use.
Neglecting that will produce an Oops in some configurations:

  BUG: key ffff000800eba398 has not been registered!

Initialize attribute allocated on the heap.

Fixes: 3f0279eb9e37 ("gpio: sim: new testing module")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-sim.c