Skip to content
Commit 8749f8ed authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij
Browse files

pinctrl: samsung: don't truncate the last char



We were allocating enough space because sizeof("-grp") and
sizeof("-mux") are both equal to 5 but in the snprintf() we only allowed
for 4 characters so the last 'p' and 'x' characters were truncated.

The allocate and sprintf can be done in one step with the kasprintf().

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 95b612cc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment