diff options
-rw-r--r-- | drivers/staging/sep/sep_driver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index bf7286e01a3..8ac3faea2d2 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -2420,11 +2420,12 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) (sep->pid_doing_transaction != 0)) { dev_dbg(&sep->pdev->dev, "ioctl pid is not owner\n"); error = -EACCES; - goto end_function; } - mutex_unlock(&sep->sep_mutex); + if (error) + return error; + if (_IOC_TYPE(cmd) != SEP_IOC_MAGIC_NUMBER) return -ENOTTY; @@ -2461,7 +2462,6 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) break; } -end_function: mutex_unlock(&sep->ioctl_mutex); return error; } |