From: Simon Glass <sjg@chromium.org>
Date: Wed, 24 Mar 2021 21:26:04 +0000 (+1300)
Subject: dm: core: Use -ENOSPC in acpi_get_path()
X-Git-Tag: v2025.01-rc5-pxa1908~1939^2~16
X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-favicon.png?a=commitdiff_plain;h=aa4ad8bbad9d18c2363565418fc0d6e3dec4e928;p=u-boot.git

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>
---

diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index 0901b9260a..2176d8b836 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -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;
 	}