projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0944d88
)
ipmi:ssif: Check dev before setting drvdata
author
Corey Minyard
<cminyard@mvista.com>
Wed, 28 Jun 2017 17:44:35 +0000
(12:44 -0500)
committer
Corey Minyard
<cminyard@mvista.com>
Wed, 28 Jun 2017 17:44:35 +0000
(12:44 -0500)
dev can be NULL.
Reported-by: Austin Christ <austinwc@codeaurora.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_ssif.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/ipmi/ipmi_ssif.c
b/drivers/char/ipmi/ipmi_ssif.c
index 61434830e641fcef8479efb0ff042acfbfbcacdd..971ecda3365788f2f0a784245ab4eb4489e1724b 100644
(file)
--- a/
drivers/char/ipmi/ipmi_ssif.c
+++ b/
drivers/char/ipmi/ipmi_ssif.c
@@
-1777,7
+1777,8
@@
static int new_ssif_client(int addr, char *adapter_name,
addr_info->addr_src = addr_src;
addr_info->dev = dev;
- dev_set_drvdata(dev, addr_info);
+ if (dev)
+ dev_set_drvdata(dev, addr_info);
list_add_tail(&addr_info->link, &ssif_infos);