Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp52012pxb; Mon, 13 Sep 2021 12:41:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/hbc+6VgH07gnyY30tzOXEtu6LpNOPgtOwpN2R4A8h/Gu77K0IkjyeFHJemWGqrs9DnqS X-Received: by 2002:a05:6402:5163:: with SMTP id d3mr15101793ede.220.1631562059812; Mon, 13 Sep 2021 12:40:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631562059; cv=none; d=google.com; s=arc-20160816; b=Xj7uaaT70YzrX2/7nKDAumR3thMx6RQi0gIqrckZma+MK6HKvJZxly7qp1z5rP8aJX bvkM8u7IiE/KzNOdvt3c8IZc+F09aqin+r57/d+MngduI2MhFzr3m0Lu9pS7vgdkwAS2 T1wHLP0ybvJvoFi1sUwdcCWyL3mqAhZJ65yPpPgHAF6J9KAvdVLL/WhBj/8t0dYnK1B0 4WOLIOwOwWjrVlWZF2W39mvkWxymWDpHVsRVybXkttke8EU7eLmzw/UF135zVl1xQvDl T8Zmgl33YiL4sqez1sV0NNiqdY4ro35pPEbwumvKqAEfzSt4xlH8zHfpjbFp6kxr+4ot 4nYg== 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=RzNKSuat2nnOJO2g6tl2CS0O/DQcOYoOEMYvprn3d1Q=; b=AoZvHQTtuiObamGwQxNwM+zb5nnS6r/lHKE6grbNdEr8OkQieF9dS2TMZLfPkSkWwu KiGeUydCOi32VThLilVLNtPPf1yv7z61wKmeWZgjWgvCnBAR+u/2jXhumXwYsopOBLQN ClV0Lr56eTOVvWfD5okUrRUHBCSiIWb6ZZQ0LFNbwJwt8ZELs/Pk3xWqtUkCsIHpZ0aq bKksJ0LSQh5BMRYiUAIz7sX+xc/TyDAYQKKkKkRGjezxyka6ktR1gwKWiP0WL5XlpqdF y7i60lur1KCYKOpqt2VTpnjvry+uO7Ya6iZaXAABNM5D3hajQkP/P/Bhrwv79Gbnu/aL lBbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="T8IYg/X0"; 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 ak17si9809114ejc.44.2021.09.13.12.40.35; Mon, 13 Sep 2021 12:40:59 -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="T8IYg/X0"; 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 S243061AbhIMNlR (ORCPT + 99 others); Mon, 13 Sep 2021 09:41:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243300AbhIMNfN (ORCPT ); Mon, 13 Sep 2021 09:35:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D8A861252; Mon, 13 Sep 2021 13:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539640; bh=7KiC/1SwSPjzV2bmnZ/FsGG5+kHJ/z4AvoT9m+N1XvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T8IYg/X06+LZIUimVp83eCm1W4oNPlmOVlZ6rC6IrXnsdXT4oot+aD0PW3Ib8vqkO OwWE8jO6mm5Y+xuNt4RIVp4HTyTK9NyrWkmyZbyRhCc0rFz7TlGjwyOQy2NjVz/F0P 5hvP0Lm2TM3b/uH6WmhbMbbEvQ7S8+mSMdqB3eiw= 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.10 069/236] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init() Date: Mon, 13 Sep 2021 15:12:54 +0200 Message-Id: <20210913131102.704479245@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 bf7c34cfb84c..c256929e859b 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -60,7 +60,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