From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 23 Mar 2021 17:14:20 +1300 Subject: [PATCH v2 2/9] dm: core: Use -ENOSPC in acpi_get_path() In-Reply-To: <20210323041427.3252184-1-sjg@chromium.org> References: <20210323041427.3252184-1-sjg@chromium.org> Message-ID: <20210323041427.3252184-3-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Update this function to use -ENOSPC which is more commly used when a buffer runs out of space. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch for acpi_get_path() drivers/core/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c index 0901b9260a1..2176d8b8365 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; } -- 2.31.0.rc2.261.g7f71774620-goog