diff options
| author | Ovidiu Panait <[email protected]> | 2022-08-29 20:02:03 +0300 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2022-09-13 11:32:48 +0200 |
| commit | 3f351cd358a3581844f3cacdfe60710bf925d75d (patch) | |
| tree | 546f6c4cbfc93a9ee9436645fc3aedfe48beff0c /include | |
| parent | 3a6948ce711b8c7692a3e717021cc2b47e69fce7 (diff) | |
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: 816226d27e ("cpu: add CPU driver for microblaze")
Signed-off-by: Ovidiu Panait <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
