+2
−2
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When creating the link to the device sysfs entry, the regulator core calls scnprintf() and then checks if the returned value is greater or equal than the buffer size. The former can never happen as scnprintf() returns the number of bytes that were actually written to the buffer, not the bytes that *would* have been written. Use the right function in this case: snprintf(). Signed-off-by:Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by:
Mark Brown <broonie@kernel.org>