Skip to content
Snippets Groups Projects
Commit 3f351cd3 authored by Ovidiu Panait's avatar Ovidiu Panait Committed by Michal Simek
Browse files

cpu: microblaze: add error handling in microblaze_cpu_get_desc()


Check snprintf() return value for errors.

Make microblaze_cpu_get_desc() directly return snprintf() error code if
ret < 0. Otherwise, if the return value is greater than or equal to size,
the resulting string is truncated, so return -ENOSPC.

Fixes: 816226d2 ("cpu: add CPU driver for microblaze")
Signed-off-by: default avatarOvidiu Panait <ovpanait@gmail.com>
Link: https://lore.kernel.org/r/20220829170205.1274484-2-ovpanait@gmail.com


Signed-off-by: default avatarMichal Simek <michal.simek@amd.com>
parent 3a6948ce
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment