From: Stefan Agner Date: Thu, 20 Oct 2016 00:32:20 +0000 (-0700) Subject: drm/fsl-dcu: unload driver before disabling clocks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39a5019a2c13580f21efc756babccb4c03b6a8ce;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/fsl-dcu: unload driver before disabling clocks Use drm_put_dev to unload the driver before disabling clocks. Otherwise the driver might read a register during unload which leads to an external abort. Signed-off-by: Stefan Agner --- diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 0b0d1cb11641..30c46a80a540 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -428,9 +428,9 @@ static int fsl_dcu_drm_remove(struct platform_device *pdev) { struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev); + drm_put_dev(fsl_dev->drm); clk_disable_unprepare(fsl_dev->clk); clk_unregister(fsl_dev->pix_clk); - drm_put_dev(fsl_dev->drm); return 0; }