浏览代码

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>
Simon Glass 3 年之前
父节点
当前提交
aa4ad8bbad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/core/acpi.c

+ 1 - 1
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;
 	}