Skip to content

Commit d3e7742

Browse files
mark1188-uigregkh
authored andcommitted
drm/hisilicon/hibmc: fix the hibmc loaded failed bug
[ Upstream commit 93a08f8 ] When hibmc loaded failed, the driver use hibmc_unload to free the resource, but the mutexes in mode.config are not init, which will access an NULL pointer. Just change goto statement to return, because hibnc_hw_init() doesn't need to free anything. Fixes: b3df5e6 ("drm/hibmc: Drop drm_vblank_cleanup") Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250813094238.3722345-5-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 06d261a commit d3e7742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,13 @@ static int hibmc_load(struct drm_device *dev)
319319

320320
ret = hibmc_hw_init(priv);
321321
if (ret)
322-
goto err;
322+
return ret;
323323

324324
ret = drmm_vram_helper_init(dev, pci_resource_start(pdev, 0),
325325
pci_resource_len(pdev, 0));
326326
if (ret) {
327327
drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
328-
goto err;
328+
return ret;
329329
}
330330

331331
ret = hibmc_kms_init(priv);

0 commit comments

Comments
 (0)