From: Wei Yongjun Date: Tue, 12 Jul 2016 11:21:46 +0000 (-0400) Subject: media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=43d0d3c52787df0221d1c52494daabd824fe84f1;p=openwrt%2Fstaging%2Fblogic.git media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open() Add the missing clk_disable_unprepare() before return from jpu_open() in the software reset error handling case. Signed-off-by: Wei Yongjun Acked-by: Mikhail Ulyanov Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c index f6092ae45912..8b44a849ab41 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: