dm: tag: change ENOSPC to ENOMEM

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>
This commit is contained in:
AKASHI Takahiro 2022-04-15 16:15:35 +09:00 committed by Heinrich Schuchardt
parent 990f6636ea
commit a806f33401

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