]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: tag: change ENOSPC to ENOMEM
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 15 Apr 2022 07:15:35 +0000 (16:15 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 23 Apr 2022 20:05:34 +0000 (22:05 +0200)
ENOMEM is a more common error code for memory starvation.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/core/tag.c

index 6829bcd8806c4743fec9e049f9d21300ca7cfeee..22999193a5a30b962a7c2809d106a43c828c83fc 100644 (file)
@@ -29,7 +29,7 @@ int dev_tag_set_ptr(struct udevice *dev, enum dm_tag_t tag, void *ptr)
 
        node = calloc(sizeof(*node), 1);
        if (!node)
-               return -ENOSPC;
+               return -ENOMEM;
 
        node->dev = dev;
        node->tag = tag;
@@ -53,7 +53,7 @@ int dev_tag_set_val(struct udevice *dev, enum dm_tag_t tag, ulong val)
 
        node = calloc(sizeof(*node), 1);
        if (!node)
-               return -ENOSPC;
+               return -ENOMEM;
 
        node->dev = dev;
        node->tag = tag;