diff options
author | Daeseok Youn <daeseok.youn@gmail.com> | 2014-04-16 05:48:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-16 17:03:40 -0400 |
commit | f7a87195603ae9db133ddd393169dd6c1d45b4a3 (patch) | |
tree | f060b041e2155815afa96448022fbd7191862320 /drivers/uwb | |
parent | 895d240d1db0b2736d779200788e4c4aea28a0c6 (diff) |
uwb: adds missing error handling
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>
Diffstat (limited to 'drivers/uwb')
-rw-r--r-- | drivers/uwb/drp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index 16ada8341c46..1a2fd9795367 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
@@ -599,8 +599,11 @@ static void uwb_drp_handle_alien_drp(struct uwb_rc *rc, struct uwb_ie_drp *drp_i | |||
599 | 599 | ||
600 | /* alloc and initialize new uwb_cnflt_alien */ | 600 | /* alloc and initialize new uwb_cnflt_alien */ |
601 | cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL); | 601 | cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL); |
602 | if (!cnflt) | 602 | if (!cnflt) { |
603 | dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n"); | 603 | dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n"); |
604 | return; | ||
605 | } | ||
606 | |||
604 | INIT_LIST_HEAD(&cnflt->rc_node); | 607 | INIT_LIST_HEAD(&cnflt->rc_node); |
605 | init_timer(&cnflt->timer); | 608 | init_timer(&cnflt->timer); |
606 | cnflt->timer.function = uwb_cnflt_timer; | 609 | cnflt->timer.function = uwb_cnflt_timer; |