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:
Simon Glass 2021-03-25 10:26:04 +13:00
parent 42a2668743
commit aa4ad8bbad
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}