MGS-2619-3 [#imx-188] fix kernel panic with rmmod
authorXianzhong <xianzhong.li@nxp.com>
Mon, 6 Mar 2017 01:58:16 +0000 (09:58 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:35 +0000 (15:21 -0500)
should unregister platform driver before device driver

Date: Mar 06, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c

index 405c258..622dc15 100644 (file)
@@ -1420,11 +1420,12 @@ out:
 
 static void __exit gpu_exit(void)
 {
+    platform_driver_unregister(&gpu_driver);
+
     if (platform.ops->unRegisterDevice)
     {
         platform.ops->unRegisterDevice(&platform);
     }
-    platform_driver_unregister(&gpu_driver);
 
     if (platform.ops->needAddDevice
      && platform.ops->needAddDevice(&platform))