1
0
Fork 0
Fork of alistair23 Linux kernel for reMarkable from https://github.com/alistair23/linux
 
 
 
 
 
 
Go to file
Alex Elder 22fd2a8ade 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>
2015-05-01 16:41:11 +02:00
drivers/staging/greybus greybus: bundle: use kstrdup() for state file 2015-05-01 16:41:11 +02:00