* [PATCH] uwb: adds missing error handling
@ 2014-04-16 9:48 Daeseok Youn
0 siblings, 0 replies; only message in thread
From: Daeseok Youn @ 2014-04-16 9:48 UTC (permalink / raw)
To: gregkh; +Cc: thomas.pugliese, daeseok.youn, linux-usb, linux-kernel
There is checking NULL before dereferncing but
it need to add "return".
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
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 16ada83..1a2fd97 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
/* 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;
--
1.7.4.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-16 9:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 9:48 [PATCH] uwb: adds missing error handling Daeseok Youn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.