Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp111713ybg; Mon, 8 Jun 2020 17:56:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIPNcgLxp87QsoH5RCZS9aqOq2rzfK6cjy+oA1r7vmdgcZ+TZYX+QUi5ZGPK1Ox8F2i3bQ X-Received: by 2002:a17:907:1118:: with SMTP id qu24mr22502201ejb.287.1591664182534; Mon, 08 Jun 2020 17:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664182; cv=none; d=google.com; s=arc-20160816; b=jD6x32ZYHr1SQmATruPHwJzwfRcy4kqJvo+jN0p7d0xedWrB/ZebG/CQDyjDSRiRgB 1kkrO22D0hnGgaD0M5zbYFS9nJiSggmIvbE+a8CPJyESsNkLeymHei+II+W2sj2z+Feh Ro2pO3p6tQYvxACsAukSNUBeqWUkjb+kxccq6pUQ+OxQDFoANosJS2XaLCvIF4kv45Kw hDzLbmOM0H/LeGqW9LLEItkI0EHrSS2SO6mbz/hikm9fQK2Zj69mZupIY/UtTizzbWy4 erc60/uBQz3pjDnkjgn508hwrfh61IcDdrCtRiSPkLTOe/qM5M651z7P1GKrKoYyR1SD o+9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bsjftZ42ns4sSQe0w0gIN/PXiOn6WnwEaIa1K/V6Nyk=; b=jrUdxPD4puP2e61XqZrWfATonykoS/SpxY2gQxQXPORLXjhHuAFfVnQtbCXA+uiWk1 pat0IIkBV3KiekbjwXdkJfsdd6xkABr34Kbq70XuAa6qygdbU19p3Ks0KL1gnhOc1nSf kkCq5+B34wu75kaxiucazz7lmv3o28ZDsvqQadRt+Xg0ZLRAqaNGB42i0Vfo6usJa4Zb fHnz6zLBTw/lsghwA0WgEAd1+vjXrpIDllIGaSkRpBRN8Hl+JUy80Vr1QHHKhZzHXbm6 7r8cF23z0bc7nv8zIYCQAppzRq1sPIxu9sdbX3zXuyHjtvYD1dCKYnYCitdt8iZL/Chi aWUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w0DptA3k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si5882439ejo.337.2020.06.08.17.55.59; Mon, 08 Jun 2020 17:56:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w0DptA3k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730299AbgFIAyM (ORCPT + 99 others); Mon, 8 Jun 2020 20:54:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:55362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726904AbgFHXJg (ORCPT ); Mon, 8 Jun 2020 19:09:36 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9FFD3208B8; Mon, 8 Jun 2020 23:09:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657775; bh=lo+IN4r4Bg9TSjj4yw/aqNpns9X/UoYTuCNNSVl6eSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w0DptA3knK0uweaUxcJFmOXSek+JBokg3HeUXUOHpH5fUrn2EvjLo8v7PvJEPZsAx Hc5bGn7wQem0CEy9Mr5sAOsywZEykcnz/3QI3Q5f3WwihxoUtUs1L+HMb3lrzksupO vOe0+Qe73xeFCOzmAm8reN2zO5pV/534SiAuWotM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , Chen-Yu Tsai , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.7 158/274] media: sun8i: Fix an error handling path in 'deinterlace_runtime_resume()' Date: Mon, 8 Jun 2020 19:04:11 -0400 Message-Id: <20200608230607.3361041-158-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 62eedb356188376acd0368384a9b294d5180c00b ] It is spurious to call 'clk_disable_unprepare()' when 'clk_prepare_enable()' has not been called yet. Re-order the error handling path to avoid it. Fixes: a4260ea49547 ("media: sun4i: Add H3 deinterlace driver") Signed-off-by: Christophe JAILLET Acked-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: err_exlusive_rate -> err_exclusive_rate] Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index d78f6593ddd1..ba5d07886607 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -941,7 +941,7 @@ static int deinterlace_runtime_resume(struct device *device) if (ret) { dev_err(dev->dev, "Failed to enable bus clock\n"); - goto err_exlusive_rate; + goto err_exclusive_rate; } ret = clk_prepare_enable(dev->mod_clk); @@ -969,14 +969,14 @@ static int deinterlace_runtime_resume(struct device *device) return 0; -err_exlusive_rate: - clk_rate_exclusive_put(dev->mod_clk); err_ram_clk: clk_disable_unprepare(dev->ram_clk); err_mod_clk: clk_disable_unprepare(dev->mod_clk); err_bus_clk: clk_disable_unprepare(dev->bus_clk); +err_exclusive_rate: + clk_rate_exclusive_put(dev->mod_clk); return ret; } -- 2.25.1