}
extdev = camsys_find_extdev(dev_id, camsys_dev);
- if (extdev != NULL) {
+ if (extdev == NULL) {
err = -EINVAL;
camsys_warn("Extdev(dev_id: 0x%x) isn't registered in %s!",
dev_id, dev_name(camsys_dev->miscdev.this_device));
list_del_init(&extdev->active);
//spin_unlock(&camsys_dev->lock);
mutex_unlock(&camsys_dev->extdevs.mut);
+
+ camsys_trace(1,"Extdev(dev_id: 0x%x) is deregister success", extdev->dev_id);
kfree(extdev);
extdev = NULL;
- camsys_trace(1,"Extdev(dev_id: 0x%x) is deregister success", extdev->dev_id);
+
} else {
//spin_lock(&camsys_dev->lock);
mutex_lock(&camsys_dev->extdevs.mut);
* 3) add soft rest callback;
*v0.7.0:
* 1) check extdev is activate or not before delete from camsys_dev active list;
+*v0.8.0:
+* 1) fix deregister a unregister extdev oops in camsys_extdev_deregister;
*/
-#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,7,0)
+#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,8,0)
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"