提交 4812952f 编写于 作者: D Dan Carpenter 提交者: Steven Rostedt

tracing: checking for NULL instead of IS_ERR()

tracing_map_elt_alloc() returns ERR_PTRs on error, never NULL.

Fixes: 08d43a5f ('tracing: Add lock-free tracing_map')
Link: http://lkml.kernel.org/r/20160423102347.GA11136@mwandaAcked-by: NTom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 20550622
......@@ -814,7 +814,7 @@ static struct tracing_map_elt *copy_elt(struct tracing_map_elt *elt)
unsigned int i;
dup_elt = tracing_map_elt_alloc(elt->map);
if (!dup_elt)
if (IS_ERR(dup_elt))
return NULL;
if (elt->map->ops && elt->map->ops->elt_copy)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册