projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'net-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git]
/
drivers
/
thunderbolt
/
icm.c
diff --git
a/drivers/thunderbolt/icm.c
b/drivers/thunderbolt/icm.c
index
6255f1e
..
fff0c74
100644
(file)
--- a/
drivers/thunderbolt/icm.c
+++ b/
drivers/thunderbolt/icm.c
@@
-1741,8
+1741,13
@@
static void icm_handle_event(struct tb *tb, enum tb_cfg_pkg_type type,
if (!n)
return;
- INIT_WORK(&n->work, icm_handle_notification);
n->pkg = kmemdup(buf, size, GFP_KERNEL);
+ if (!n->pkg) {
+ kfree(n);
+ return;
+ }
+
+ INIT_WORK(&n->work, icm_handle_notification);
n->tb = tb;
queue_work(tb->wq, &n->work);