commit | 22fd2a8ade59bb97f0a64282ba5b3903ba3e9e89 | [log] [tgz] |
---|---|---|
author | Alex Elder <elder@linaro.org> | Fri Apr 17 14:41:47 2015 -0500 |
committer | Greg Kroah-Hartman <gregkh@google.com> | Fri May 01 16:41:11 2015 +0200 |
tree | a6188c48e82f0098c03812f430a321d019e0fa02 | |
parent | 55b930cd17a7cd66a1fb2a587660a344ea5a9ee2 [diff] |
greybus: bundle: use kstrdup() for state file The kernfs code guarantees we'll get a NUL-terminated buffer. Use kstrdup() rather than kzalloc() + memcpy() in state_store() making it slightly clearer what we're doing. This has the added benefit of guaranteeing that the stored string has no NUL character inside it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>