Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 14:08:45 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 14:09:08 +0200
commita1e5fdb38a97727f0168df746087ea04ef5958ae (patch)
tree768d114ec2953e85c0bfe208066ba3898919ebd1
parent2233edea3fee87627cdff56eaec537d40a17e1e5 (diff)
media: rcar_jpu: Add missing clk_disable_unprepare() on error
in jpu_open() (bsc#1051510). suse-commit: 2cadd91ac62ea185a29feac48f9e9778ed33e1d8
-rw-r--r--drivers/media/platform/rcar_jpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c
index d1746ecc645d..db1110a492e0 100644
--- a/drivers/media/platform/rcar_jpu.c
+++ b/drivers/media/platform/rcar_jpu.c
@@ -1280,7 +1280,7 @@ static int jpu_open(struct file *file)
/* ...issue software reset */
ret = jpu_reset(jpu);
if (ret)
- goto device_prepare_rollback;
+ goto jpu_reset_rollback;
}
jpu->ref_count++;
@@ -1288,6 +1288,8 @@ static int jpu_open(struct file *file)
mutex_unlock(&jpu->mutex);
return 0;
+jpu_reset_rollback:
+ clk_disable_unprepare(jpu->clk);
device_prepare_rollback:
mutex_unlock(&jpu->mutex);
v4l_prepare_rollback: