mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 01:56:57 +07:00
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