summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-11-19 21:42:28 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2024-12-02 14:05:26 +0100
commitfddffe84b1af672da933ab236f8e7f25c8619dd1 (patch)
tree836ed96e36f47d269401ebada1861ded65e158b9 /drivers
parent5c546082840f8f91631623706f39bf5daa77d16c (diff)
downloadlinux-fddffe84b1af672da933ab236f8e7f25c8619dd1.tar.gz
linux-fddffe84b1af672da933ab236f8e7f25c8619dd1.tar.bz2
linux-fddffe84b1af672da933ab236f8e7f25c8619dd1.zip
media: s5p-mfc: Fix an error handling path s5p_mfc_open()
A mfc_debug_enter() is not balanced by a corresponding mfc_debug_leave(). Add the missing call. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
index 2fe3c9228ac5..5f80931f056d 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
@@ -774,8 +774,10 @@ static int s5p_mfc_open(struct file *file)
int ret = 0;
mfc_debug_enter();
- if (mutex_lock_interruptible(&dev->mfc_mutex))
- return -ERESTARTSYS;
+ if (mutex_lock_interruptible(&dev->mfc_mutex)) {
+ ret = -ERESTARTSYS;
+ goto err_enter;
+ }
dev->num_inst++; /* It is guarded by mfc_mutex in vfd */
/* Allocate memory for context */
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
@@ -946,6 +948,7 @@ err_no_ctx:
err_alloc:
dev->num_inst--;
mutex_unlock(&dev->mfc_mutex);
+err_enter:
mfc_debug_leave();
return ret;
}