diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2016-12-20 12:28:19 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-30 08:39:13 +0000 |
commit | 86aa023fa68178d22bd90098da84165140673c7f (patch) | |
tree | 18354fe3126412c98a6bd70988e7405dabac8af3 /kernel/audit_tree.c | |
parent | d47162bdba70c4d4eccf0a728932e097f9fd9d4c (diff) |
gpio: mockup: dynamically allocate memory for chip name
[ Upstream commit ad6d8004fa29a8958381b60215e32d1e903b0492 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/audit_tree.c')
0 files changed, 0 insertions, 0 deletions