Commit 6926872a authored by Jialin Zhang's avatar Jialin Zhang Committed by Daniel Vetter

drm/gma500: Fix error return code in psb_driver_load()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 5c49fd3a ("gma500: Add the core DRM files and headers")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201130020216.1906141-1-zhangjialin11@huawei.com
parent 5cf82904
......@@ -312,6 +312,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
if (ret)
goto out_err;
ret = -ENOMEM;
dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
if (!dev_priv->mmu)
goto out_err;
......
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