提交 f7a87195 编写于 作者: D Daeseok Youn 提交者: Greg Kroah-Hartman

uwb: adds missing error handling

There is checking NULL before dereferncing but
it need to add "return".
Signed-off-by: NDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 895d240d
...@@ -599,8 +599,11 @@ static void uwb_drp_handle_alien_drp(struct uwb_rc *rc, struct uwb_ie_drp *drp_i ...@@ -599,8 +599,11 @@ static void uwb_drp_handle_alien_drp(struct uwb_rc *rc, struct uwb_ie_drp *drp_i
/* alloc and initialize new uwb_cnflt_alien */ /* alloc and initialize new uwb_cnflt_alien */
cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL); cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL);
if (!cnflt) if (!cnflt) {
dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n"); dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n");
return;
}
INIT_LIST_HEAD(&cnflt->rc_node); INIT_LIST_HEAD(&cnflt->rc_node);
init_timer(&cnflt->timer); init_timer(&cnflt->timer);
cnflt->timer.function = uwb_cnflt_timer; cnflt->timer.function = uwb_cnflt_timer;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册