All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] gpio: mockup: dynamically allocate memory for chip name
Date: Wed, 28 Dec 2016 14:13:16 +0100	[thread overview]
Message-ID: <CACRpkdYmfB6vaM=tFqsZO24_Rah8sFmnriHd-FT+RvPK=xxEnw@mail.gmail.com> (raw)
In-Reply-To: <1482233300-20078-3-git-send-email-bgolaszewski@baylibre.com>

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

  reply	other threads:[~2016-12-28 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 11:28 [PATCH 0/3] gpio: mockup: bug fixes and tweaks Bartosz Golaszewski
2016-12-20 11:28 ` [PATCH 1/3] gpio: mockup: make pins_name_start static Bartosz Golaszewski
2016-12-28 13:12   ` Linus Walleij
2016-12-20 11:28 ` [PATCH 2/3] gpio: mockup: dynamically allocate memory for chip name Bartosz Golaszewski
2016-12-28 13:13   ` Linus Walleij [this message]
2016-12-20 11:28 ` [PATCH 3/3] gpio: mockup: coding style fixes Bartosz Golaszewski
2016-12-28 13:14   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACRpkdYmfB6vaM=tFqsZO24_Rah8sFmnriHd-FT+RvPK=xxEnw@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=gnurou@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.