Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1112836imm; Wed, 1 Aug 2018 10:23:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpclj2/zDLPRGsJD4FC3MiWYWzUshYUN2+/kHnYoaeBvG7lONOtyomjfnrM7ZQWSyS13/UbT X-Received: by 2002:a62:5984:: with SMTP id k4-v6mr27614791pfj.116.1533144199227; Wed, 01 Aug 2018 10:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144199; cv=none; d=google.com; s=arc-20160816; b=CoQC77s3skykoIwQXfqh1VlewZVzcmgbqR4l1YCGmMpI1bAsrfPSpku/Q6GHp77QCU 1NCmR8OQrLmMFiSUTBQm6ON88Exs/E0I9Fs/bD3gG183uF7oDDVgOotgQRiqT7QmTqb4 7n+ZOkFHgAS4ydcaAGlq+8bBQeUmhWN6gLZSBPO+wJTbKYqNjEUBgIvdkXdQkWOLVO/R lc0tWom26pLJ4mg08fDXsz09kXcKk/SuhsIo+VTrBmiexhlEI2hhQmTUu/wjrLGjuyHe 8abYqpxMEr/m1XC6oY741lPWsxrHMuajZZ4DEefXyMDG8WPIVjc+a/MfzToS3pw/nTKd IhMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=vCg+sBFcjgPUEVjlWfICjssUlXRQrIlY/BSu7XEe5+k=; b=QwXeRn/4jEtbQhrU+YUNuJUZ4rFO79iik6BqtPx0UK560GHJEwx727pu+R6/JHc0MJ cvAKVO97MB+eZipK7AxRGstAG6FYmPZbCzIb6PaMdPQm2tXLY58jMu6gBcZ1mXzN5alA bVxtUvC0/Msz9mSsPM8iivikJcTKWJSU4rfckXyQmBC8mF7HkHYVwZhgs7dkOjxSIX6A ELUQrIgPF6QSfN9k22xK0NYGVn3HaPvyZiHOmE3GaLZnujgTb3ub67+N7ceItWrbdWoz kJ6SmBa1DFq72v/C7UkCTktQgwSEO3b/nvW4GO3ObPFASSWyK9avM6O8Uw+yYPmtxuij GCZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7-v6si14758585pgp.411.2018.08.01.10.23.04; Wed, 01 Aug 2018 10:23:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405116AbeHATHu (ORCPT + 99 others); Wed, 1 Aug 2018 15:07:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49282 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390320AbeHATHu (ORCPT ); Wed, 1 Aug 2018 15:07:50 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 18654CE6; Wed, 1 Aug 2018 17:21:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Mikhail Ulyanov , Kieran Bingham , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 150/246] media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open() Date: Wed, 1 Aug 2018 18:51:00 +0200 Message-Id: <20180801165018.921047470@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yongjun [ Upstream commit 43d0d3c52787df0221d1c52494daabd824fe84f1 ] 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 Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/rcar_jpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- 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: