diff options
author | Corey Minyard <cminyard@mvista.com> | 2017-06-28 19:44:35 +0200 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2017-06-28 19:44:35 +0200 |
commit | 87ff091c4061eae16c799af51030b539afec97ef (patch) | |
tree | 51e92663efdf692b380f2460815b0ead7471e424 | |
parent | ipmi: Convert DMI handling over to a platform device (diff) | |
download | linux-87ff091c4061eae16c799af51030b539afec97ef.tar.xz linux-87ff091c4061eae16c799af51030b539afec97ef.zip |
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>
-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); |