From: alpha lin Date: Mon, 31 Oct 2016 01:06:33 +0000 (+0800) Subject: rockchip/iep: bugfix, inconsistent mutex operation X-Git-Tag: firefly_0821_release~1340 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=612d0d0aca5b5db5699999f9a1bed49a6c355404;p=firefly-linux-kernel-4.4.55.git rockchip/iep: bugfix, inconsistent mutex operation Fix a inconsistent mutex operation in iep driver. Change-Id: Iddb25d89013438da9a4985f9d9f663061c750eeb Signed-off-by: alpha lin --- diff --git a/drivers/video/rockchip/iep/iep_drv.c b/drivers/video/rockchip/iep/iep_drv.c index 0ddd41983f34..c8bf9d22b7b2 100644 --- a/drivers/video/rockchip/iep/iep_drv.c +++ b/drivers/video/rockchip/iep/iep_drv.c @@ -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: