Commit 72eab0ba authored by Tian Tao's avatar Tian Tao

drm/hisilicon: Remove drm_dev_put in hibmc

Hibmc use the devm_drm_dev_alloc function in hibmc_pci_probe, if
hibmc_pci_probe returns non-zero, devm_drm_dev_alloc will call
devm_drm_dev_init, which will call devm_drm_dev_init_release to
release drm_dev_put. There is no need for hibmc to call
drm_dev_put separately.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1608638156-7879-1-git-send-email-tiantao6@hisilicon.com
parent 4c5d02d9
...@@ -332,13 +332,13 @@ static int hibmc_pci_probe(struct pci_dev *pdev, ...@@ -332,13 +332,13 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
ret = pcim_enable_device(pdev); ret = pcim_enable_device(pdev);
if (ret) { if (ret) {
drm_err(dev, "failed to enable pci device: %d\n", ret); drm_err(dev, "failed to enable pci device: %d\n", ret);
goto err_free; goto err_return;
} }
ret = hibmc_load(dev); ret = hibmc_load(dev);
if (ret) { if (ret) {
drm_err(dev, "failed to load hibmc: %d\n", ret); drm_err(dev, "failed to load hibmc: %d\n", ret);
goto err_free; goto err_return;
} }
ret = drm_dev_register(dev, 0); ret = drm_dev_register(dev, 0);
...@@ -354,9 +354,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev, ...@@ -354,9 +354,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
err_unload: err_unload:
hibmc_unload(dev); hibmc_unload(dev);
err_free: err_return:
drm_dev_put(dev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment