usb: dwc3: debug: fix string position formatting mixup with ret and len
Currently the string formatting is mixing up the offset of ret and len. Re-work the code to use just len, remove ret and use scnprintf instead of snprintf and len position accumulation where required. Remove the -ve return check since scnprintf never returns a failure -ve size. Also break overly long lines to clean up checkpatch warnings. Addresses-Coverity: ("Unused value") Fixes: 1381a511 ("usb: dwc3: debug: purge usage of strcat") Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Showing
Please register or sign in to comment