dm: core: Use -ENOSPC in acpi_get_path()
authorSimon Glass <sjg@chromium.org>
Wed, 24 Mar 2021 21:26:04 +0000 (10:26 +1300)
committerSimon Glass <sjg@chromium.org>
Tue, 6 Apr 2021 04:33:19 +0000 (16:33 +1200)
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>
drivers/core/acpi.c

index 0901b92..2176d8b 100644 (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;
        }