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>
1 file changed
tree: a6188c48e82f0098c03812f430a321d019e0fa02
  1. drivers/