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>
This commit is contained in:
Corey Minyard 2017-06-28 12:44:35 -05:00
parent 0944d889a2
commit 87ff091c40
1 changed files with 2 additions and 1 deletions

View File

@ -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);