]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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 0901b9260a1625958d506a3d50b732a28323e904..2176d8b83655b5f2d011a6e216ce149672365fb0 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;
        }