[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1370634791.9844.94.camel@gandalf.local.home>
Date: Fri, 07 Jun 2013 15:53:11 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH] tracing: Do not call kmem_cache_free() on allocation
failure
On Fri, 2013-06-07 at 15:07 +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@....com>
>
> There's no point calling it when _alloc() failed.
Thanks, I queued this up for 3.11 as it's not that important for a late
-rc release.
-- Steve
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
> kernel/trace/trace_events.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 27963e2bf4bf..bb4950b552b5 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -97,7 +97,7 @@ static int __trace_define_field(struct list_head *head, const char *type,
>
> field = kmem_cache_alloc(field_cachep, GFP_TRACE);
> if (!field)
> - goto err;
> + return -ENOMEM;
>
> field->name = name;
> field->type = type;
> @@ -114,11 +114,6 @@ static int __trace_define_field(struct list_head *head, const char *type,
> list_add(&field->link, head);
>
> return 0;
> -
> -err:
> - kmem_cache_free(field_cachep, field);
> -
> - return -ENOMEM;
> }
>
> int trace_define_field(struct ftrace_event_call *call, const char *type,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists