mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
uwb: adds missing error handling
There is checking NULL before dereferncing but it need to add "return". Signed-off-by: Daeseok Youn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
895d240d1d
commit
f7a8719560
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue