Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1823464pxb; Mon, 13 Sep 2021 06:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcSf6z2Mmg+16N30TjzPudKnDfUx4xLk5bH46JDDO6HTEOgApWsg+Vkbi6wjUNVrFmnTY5 X-Received: by 2002:a6b:c3ce:: with SMTP id t197mr9014773iof.159.1631539333064; Mon, 13 Sep 2021 06:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631539333; cv=none; d=google.com; s=arc-20160816; b=KYV18OSxFv0g+izvnHEne50mzUZp9Goj85qnyzRu9R2biR+B+kkyFPqooEhl2dZSmM GYMC/EkMfK9XZm6XEUxuiaHKRCLqOuhF7+iGBVuPYaTz+dsC9DdORcWV2+oY+2mSdOfj JthJjRuLMoeVecR4wgeMzDfhy1QjAxSH6PJr1LXz7jMoWO5b7ytzlEbWNxLa7cSQx4QS man/fVJ4jH+C604PFVAICHFOcgQeqm1YQpeshglZsvb+Y5/keTawRKOQujLiRYY4l4h1 YDOvTVzq56Wg7ZGBdiqcXVq8EOMqgLQ0FxX8xJzE4iy8D2OhXwUDhUm4aNuc+SConUju 6Lnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MAyeW0164LSSTTrvhIyN7al1xaFmK8Yibk7wHcYin4c=; b=xInHv6AemaLUpOiGwu3m+5cJCAu6CV1p5uTktNvDLBIx6NqNHs0E/FHLndsiRXZ/Fi R1bD8ukOzjBa0twagTlxSAw4EPfLwcZUQ4W7ftrKfTy0znK7hpGmCQ1eIqYr1mY+d2wG tzw2PNAIc317qgeZS6f+OXgu95zwKfSD7bS4WQZzAYB+bVbIX2WUGIe6GraIigCWQgr5 m+nlHPnmTAOLLmuwMN5UcSqnUGDF7KFuFoQLf2X+AvP78hO43Yqx81OWMtPmu7dfpW9m k5jkCwIIrtI6otB4vwhstD3gJo5wmpf2OyOjixUiOQNqc5lAj/5DN1CPV70GtOfFtXUa yleA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OEC6haAM; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si6903569jac.8.2021.09.13.06.21.59; Mon, 13 Sep 2021 06:22:13 -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=@linuxfoundation.org header.s=korg header.b=OEC6haAM; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239896AbhIMNVw (ORCPT + 99 others); Mon, 13 Sep 2021 09:21:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240351AbhIMNU2 (ORCPT ); Mon, 13 Sep 2021 09:20:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B14F60698; Mon, 13 Sep 2021 13:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539114; bh=CS8+VcMOYQjXehMLMNKCWfwJBXllx38Yv8JbyfhpRwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OEC6haAMfWqZWl3GoePUDkqTVxT6hERg6d3u3lVpKnvsOayaDbCvQD0tG0XTRVPFD DG0eMg6KIXduKXjhdnbCEEbHyDYF1ry6kfreRUHAbYNzRmVSgm6WWlDuAaGEmet/3M qt6gnIgjDsv1ycF669SVAkDV2BomYrvB+e0+UMl4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wei Yongjun , Steven Price , Sasha Levin Subject: [PATCH 5.4 046/144] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init() Date: Mon, 13 Sep 2021 15:13:47 +0200 Message-Id: <20210913131049.484390574@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit f42498705965bd4b026953c1892c686d8b1138e4 ] Fix the missing clk_disable_unprepare() before return from panfrost_clk_init() in the error handling case. Fixes: b681af0bc1cc ("drm: panfrost: add optional bus_clock") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210608143856.4154766-1-weiyongjun1@huawei.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/panfrost/panfrost_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index 238fb6d54df4..413bf314a2bc 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -59,7 +59,8 @@ static int panfrost_clk_init(struct panfrost_device *pfdev) if (IS_ERR(pfdev->bus_clock)) { dev_err(pfdev->dev, "get bus_clock failed %ld\n", PTR_ERR(pfdev->bus_clock)); - return PTR_ERR(pfdev->bus_clock); + err = PTR_ERR(pfdev->bus_clock); + goto disable_clock; } if (pfdev->bus_clock) { -- 2.30.2