diff options
author | Corey Minyard <cminyard@mvista.com> | 2017-06-28 20:44:35 +0300 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2017-06-28 20:44:35 +0300 |
commit | 87ff091c4061eae16c799af51030b539afec97ef (patch) | |
tree | 51e92663efdf692b380f2460815b0ead7471e424 /drivers/char/ipmi | |
parent | 0944d889a237b6107f9ceeee053fe7221cdd1089 (diff) | |
download | linux-87ff091c4061eae16c799af51030b539afec97ef.tar.xz |
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/ipmi')
-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 61434830e641..971ecda33657 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); |