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");
|
||||
if (path) {
|
||||
if (strlen(path) >= maxlen)
|
||||
return -E2BIG;
|
||||
return -ENOSPC;
|
||||
strcpy(out_path, path);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user