1. 04 Nov, 2022 1 commit
    • Yuan Can's avatar
      drm/ingenic: Fix missing platform_driver_unregister() call in ingenic_drm_init() · 47078311
      Yuan Can authored
      A problem about modprobe ingenic-drm failed is triggered with the following
      log given:
      
       [  303.561088] Error: Driver 'ingenic-ipu' is already registered, aborting...
       modprobe: ERROR: could not insert 'ingenic_drm': Device or resource busy
      
      The reason is that ingenic_drm_init() returns platform_driver_register()
      directly without checking its return value, if platform_driver_register()
      failed, it returns without unregistering ingenic_ipu_driver_ptr, resulting
      the ingenic-drm can never be installed later.
      A simple call graph is shown as below:
      
       ingenic_drm_init()
         platform_driver_register() # ingenic_ipu_driver_ptr are registered
         platform_driver_register()
           driver_register()
             bus_add_driver()
               priv = kzalloc(...) # OOM happened
         # return without unregister ingenic_ipu_driver_ptr
      
      Fixing this problem by checking the return value of
      platform_driver_register() and do platform_unregister_drivers() if
      error happened.
      
      Fixes: fc1acf31 ("drm/ingenic: Add support for the IPU")
      Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221104064512.8569-1-yuancan@huawei.com
      47078311
  2. 03 Nov, 2022 14 commits
  3. 02 Nov, 2022 4 commits
  4. 01 Nov, 2022 4 commits
  5. 31 Oct, 2022 2 commits
  6. 29 Oct, 2022 5 commits
  7. 28 Oct, 2022 8 commits
  8. 27 Oct, 2022 2 commits