Skip to content

Commit

Permalink
uwb: adds missing error handling
Browse files Browse the repository at this point in the history
There is checking NULL before dereferncing but
it need to add "return".

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Daeseok Youn authored and Greg Kroah-Hartman committed Apr 16, 2014
1 parent 895d240 commit f7a8719
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/uwb/drp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL);
if (!cnflt)
if (!cnflt) {
dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n");
return;
}

INIT_LIST_HEAD(&cnflt->rc_node);
init_timer(&cnflt->timer);
cnflt->timer.function = uwb_cnflt_timer;
Expand Down

0 comments on commit f7a8719

Please sign in to comment.