提交 7504d3bb 编写于 作者: L Liu ChengZhe 提交者: Alex Deucher

drm/amd/amdgpu: handle return value of amdgpu_driver_load_kms

if guest driver failed to enter full GPU access, amdgpu_driver_load_kms
will unload kms and free dev->dev_private, drm_dev_register would access
null pointer. Driver will enter an error state and can't be unloaded.
Signed-off-by: NLiu ChengZhe <ChengZhe.Liu@amd.com>
Reviewed-by: NMadhav Chauhan <madhav.chauhan@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 10eafd3e
......@@ -1111,7 +1111,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
pci_set_drvdata(pdev, dev);
amdgpu_driver_load_kms(dev, ent->driver_data);
ret = amdgpu_driver_load_kms(dev, ent->driver_data);
if (ret)
goto err_pci;
retry_init:
ret = drm_dev_register(dev, ent->driver_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册