forked from Minki/linux
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:
parent
0944d889a2
commit
87ff091c40
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user