소스 검색

drm/omap: fix uninit order in pdev_remove()

When unloading omapdrm driver, the omapdrm platform device is
uninitialized last, after the displays have been disconnected omap_crtc
callbacks have been removed. As the omapdrm pdev uninitialization needs
the features uninitialized in earlier steps, a crash is guaranteed.

This patch fixes the uninitialize order so that the omapdrm pdev is
removed first.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tomi Valkeinen 11 년 전
부모
커밋
707cf58a0a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      drivers/gpu/drm/omapdrm/omap_drv.c

+ 2 - 1
drivers/gpu/drm/omapdrm/omap_drv.c

@@ -696,10 +696,11 @@ static int pdev_remove(struct platform_device *device)
 {
 {
 	DBG("");
 	DBG("");
 
 
+	drm_put_dev(platform_get_drvdata(device));
+
 	omap_disconnect_dssdevs();
 	omap_disconnect_dssdevs();
 	omap_crtc_pre_uninit();
 	omap_crtc_pre_uninit();
 
 
-	drm_put_dev(platform_get_drvdata(device));
 	return 0;
 	return 0;
 }
 }