regmap: potentially duplicate the name string stored in regmap

Currently we just copy over the pointer passed to regmap_init() in
the regmap config struct. To be on the safe side: duplicate the string
with kstrdup_const() so that if an unaware user passes an address to
a stack-allocated buffer, we won't crash.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Bartosz Golaszewski 2017-12-13 17:25:31 +01:00 • committed by Mark Brown
commit 8253bb3f82
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0