rockchip/iep: bugfix, inconsistent mutex operation
authoralpha lin <alpha.lin@rock-chips.com>
Mon, 31 Oct 2016 01:06:33 +0000 (09:06 +0800)
committeralpha lin <alpha.lin@rock-chips.com>
Mon, 31 Oct 2016 01:16:58 +0000 (09:16 +0800)
Fix a inconsistent mutex operation in iep driver.

Change-Id: Iddb25d89013438da9a4985f9d9f663061c750eeb
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
drivers/video/rockchip/iep/iep_drv.c

index 0ddd41983f342662f768833f26e7e11f592de5ad..c8bf9d22b7b284f67bcd7ec1decd55864797b181 100644 (file)
@@ -802,7 +802,7 @@ static long iep_ioctl(struct file *filp, uint32_t cmd, unsigned long arg)
                        if (copy_to_user((void __user *)arg, &iommu_enable,
                                sizeof(int))) {
                                IEP_ERR("error: copy_to_user failed\n");
-                               return -EFAULT;
+                               ret = -EFAULT;
                        }
                }
                break;
@@ -810,7 +810,7 @@ static long iep_ioctl(struct file *filp, uint32_t cmd, unsigned long arg)
                if (copy_to_user((void __user *)arg, &iep_drvdata1->cap,
                        sizeof(struct IEP_CAP))) {
                        IEP_ERR("error: copy_to_user failed\n");
-                       return -EFAULT;
+                       ret = -EFAULT;
                }
                break;
        default:
@@ -895,7 +895,7 @@ static long compat_iep_ioctl(struct file *filp, uint32_t cmd,
                        if (copy_to_user((void __user *)arg, &iommu_enable,
                                sizeof(int))) {
                                IEP_ERR("error: copy_to_user failed\n");
-                               return -EFAULT;
+                               ret = -EFAULT;
                        }
                }
                break;
@@ -903,7 +903,7 @@ static long compat_iep_ioctl(struct file *filp, uint32_t cmd,
                if (copy_to_user((void __user *)arg, &iep_drvdata1->cap,
                        sizeof(struct IEP_CAP))) {
                        IEP_ERR("error: copy_to_user failed\n");
-                       return -EFAULT;
+                       ret = -EFAULT;
                }
                break;
        default: