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:
Родитель
0944d889a2
Коммит
87ff091c40
|
@ -1777,7 +1777,8 @@ static int new_ssif_client(int addr, char *adapter_name,
|
||||||
addr_info->addr_src = addr_src;
|
addr_info->addr_src = addr_src;
|
||||||
addr_info->dev = dev;
|
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);
|
list_add_tail(&addr_info->link, &ssif_infos);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче