diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2016-12-20 12:28:19 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-12-28 14:12:51 +0100 |
commit | ad6d8004fa29a8958381b60215e32d1e903b0492 (patch) | |
tree | 5e059a240bc3e8a0e50580194d2181bbbbdce467 /drivers/gpio/gpio-mm-lantiq.c | |
parent | gpio: mockup: make pins_name_start static (diff) | |
download | linux-dev-ad6d8004fa29a8958381b60215e32d1e903b0492.tar.xz linux-dev-ad6d8004fa29a8958381b60215e32d1e903b0492.zip |
gpio: mockup: dynamically allocate memory for chip name
Currently the chip name buffer is allocated on the stack and the
address of the buffer is passed to the gpio framework. It's invalid
after probe() returns, so the sysfs label attribute displays garbage.
Use devm_kasprintf() for each string instead.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mm-lantiq.c')
0 files changed, 0 insertions, 0 deletions