diff options
author | Corey Minyard <cminyard@mvista.com> | 2017-06-28 12:44:35 -0500 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2017-06-28 12:44:35 -0500 |
commit | 87ff091c4061eae16c799af51030b539afec97ef (patch) | |
tree | 51e92663efdf692b380f2460815b0ead7471e424 /drivers/char | |
parent | 0944d889a237b6107f9ceeee053fe7221cdd1089 (diff) | |
download | op-kernel-dev-87ff091c4061eae16c799af51030b539afec97ef.zip op-kernel-dev-87ff091c4061eae16c799af51030b539afec97ef.tar.gz |
ipmi:ssif: Check dev before setting drvdata
dev can be NULL.
Reported-by: Austin Christ <austinwc@codeaurora.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 6143483..971ecda 100644 --- 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); |