diff mbox series

[v4,01/12] dm: tag: change ENOSPC to ENOMEM

Message ID 20220415071546.122475-2-takahiro.akashi@linaro.org
State Superseded
Headers show
Series efi_loader: more tightly integrate UEFI disks to driver model | expand

Commit Message

AKASHI Takahiro April 15, 2022, 7:15 a.m. UTC
ENOMEM is a more common error code for memory starvation.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 drivers/core/tag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Heinrich Schuchardt April 15, 2022, 7:59 a.m. UTC | #1
On 4/15/22 09:15, AKASHI Takahiro wrote:
> 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>

> ---
>   drivers/core/tag.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/core/tag.c b/drivers/core/tag.c
> index 6829bcd8806c..22999193a5a3 100644
> --- a/drivers/core/tag.c
> +++ b/drivers/core/tag.c
> @@ -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;
Ilias Apalodimas April 15, 2022, 9:11 a.m. UTC | #2
On Fri, 15 Apr 2022 at 10:59, Heinrich Schuchardt <xypron.glpk@gmx.de>
wrote:

> On 4/15/22 09:15, AKASHI Takahiro wrote:
> > 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>
>
> > ---
> >   drivers/core/tag.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/core/tag.c b/drivers/core/tag.c
> > index 6829bcd8806c..22999193a5a3 100644
> > --- a/drivers/core/tag.c
> > +++ b/drivers/core/tag.c
> > @@ -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;
>


Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/drivers/core/tag.c b/drivers/core/tag.c
index 6829bcd8806c..22999193a5a3 100644
--- a/drivers/core/tag.c
+++ b/drivers/core/tag.c
@@ -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;