Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1547951
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] gpio: mockup: dynamically allocate memory for chip name |
| Date | 2016-12-28 14:20 +0100 |
| Message-ID | <sTmj7-gu-5@gated-at.bofh.it> (permalink) |
| References | <sQqMh-4Vr-13@gated-at.bofh.it> <sQqMi-4Vr-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Dec 20, 2016 at 12:28 PM, Bartosz Golaszewski <bgolaszewski@baylibre.com> wrote: > 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> Patch applied. Yours, Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/3] gpio: mockup: dynamically allocate memory for chip name Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-20 12:30 +0100 Re: [PATCH 2/3] gpio: mockup: dynamically allocate memory for chip name Linus Walleij <linus.walleij@linaro.org> - 2016-12-28 14:20 +0100
csiph-web