Re: [PATCH 1/1] alloc_tag: fix empty codetag module section handling
From: Dan Carpenter
Date: Fri Nov 01 2024 - 03:04:48 EST
On Thu, Oct 31, 2024 at 05:00:17PM -0700, Suren Baghdasaryan wrote:
> diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c
> index 1c74942e6dfd..00ab18ea452a 100644
> --- a/lib/alloc_tag.c
> +++ b/lib/alloc_tag.c
> @@ -437,7 +437,7 @@ static void *reserve_module_tags(struct module *mod, unsigned long size,
>
> /* If no tags return NULL */
^^^^^^^^^^^
> if (size < sizeof(struct alloc_tag))
> - return NULL;
> + return ERR_PTR(-EINVAL);
>
Thanks for this. We'd want to update the comment as well.
regards,
dan carpenter