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 6829bcd..2299919 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)
 
        node = calloc(sizeof(*node), 1);
        if (!node)
-               return -ENOSPC;
+               return -ENOMEM;
 
        node->dev = dev;
        node->tag = tag;
 
        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)
 
        node = calloc(sizeof(*node), 1);
        if (!node)
-               return -ENOSPC;
+               return -ENOMEM;
 
        node->dev = dev;
        node->tag = tag;
 
        node->dev = dev;
        node->tag = tag;