Staging: most: add MOST driver's aim-v4l2 module

Dan Carpenter dan.carpenter at oracle.com
Tue Jul 28 16:58:45 UTC 2015


Hello Christian Gromm,

The patch 3d31c0cb6c12: "Staging: most: add MOST driver's aim-v4l2
module" from Jul 24, 2015, leads to the following static checker
warning:

	drivers/staging/most/aim-v4l2/video.c:623 aim_exit()
	error: double unlock 'spin_lock:&list_lock'

drivers/staging/most/aim-v4l2/video.c
   604  static void __exit aim_exit(void)
   605  {
   606          struct most_video_dev *mdev, *tmp;
   607  
   608          /*
   609           * As the mostcore currently doesn't call disconnect_channel()
   610           * for linked channels while we call most_deregister_aim()
   611           * we simulate this call here.
   612           * This must be fixed in core.
   613           */
   614          spin_lock(&list_lock);
   615          list_for_each_entry_safe(mdev, tmp, &video_devices, list) {
   616                  list_del(&mdev->list);
   617                  spin_unlock(&list_lock);
                         ^^^^^^^^^^^^^^^^^^^^^^
Unlock.

   618  
   619                  aim_unregister_videodev(mdev);
   620                  v4l2_device_disconnect(&mdev->v4l2_dev);
   621                  v4l2_device_put(&mdev->v4l2_dev);
   622          }
   623          spin_unlock(&list_lock);
                ^^^^^^^^^^^^^^^^^^^^^^^
Second unlock.

   624  
   625          most_deregister_aim(&aim_info);
   626          BUG_ON(!list_empty(&video_devices));
   627  }


regards,
dan carpenter


More information about the devel mailing list