mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
dm: core: Use -ENOSPC in acpi_get_path()
Update this function to use -ENOSPC which is more commly used when a buffer runs out of space. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
42a2668743
commit
aa4ad8bbad
|
@ -91,7 +91,7 @@ int acpi_get_path(const struct udevice *dev, char *out_path, int maxlen)
|
||||||
path = dev_read_string(dev, "acpi,path");
|
path = dev_read_string(dev, "acpi,path");
|
||||||
if (path) {
|
if (path) {
|
||||||
if (strlen(path) >= maxlen)
|
if (strlen(path) >= maxlen)
|
||||||
return -E2BIG;
|
return -ENOSPC;
|
||||||
strcpy(out_path, path);
|
strcpy(out_path, path);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user