Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4145829pxj; Tue, 8 Jun 2021 07:31:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ5WcnhpOvZpGOFh3IdRiIkVv8FKP5iZFNEDte88p63XzfK+Ha6O3Qp5UXKN9nvg2ttEqY X-Received: by 2002:a17:906:e88:: with SMTP id p8mr24071031ejf.105.1623162677232; Tue, 08 Jun 2021 07:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623162677; cv=none; d=google.com; s=arc-20160816; b=L2wvQrOIVuiD4HwI1Mm76HU9l3pfRx4GRe4clmdCytt7KsjwUrLIe2kA2eQITUHesQ /yJDTAJwkp6EeQfRvVAkB4Hq/oM0SUSUgilZr6pxlgaW5dJ/fstQ9dc3om8wuTr+Qti5 14B39zkC4v9sUF9lIqX1UMF0faA19XuEOHWU8GSVFxhvDcK5RdphNt1BkIrvO6EXZlSQ kB4KYo2GGKnUzf2GiE7QQQT3RoJ4FEIgSXCBjw3jUyoTskcAEYH+eTL8r2Is9tpi8Faj Qp/bIZcRJicVzY3WTUfyQgf8EeNA9kuoa+5lEuEC4yEKyWdZKeSXIQ252fh77aYmFImH lACw== 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 :message-id:date:subject:cc:to:from; bh=K1qfVMvsSBHjNCl6nqi09PoB+e2ZyMfidm9Y4jDu+Zc=; b=ftfC7YqVRykJq9gf6bpLzzxvWxZpo9hh1ahD4a59ql5adKIJSeSgtLVdb7KTxtkhXB B3mQKF6Hi+MYinkCoyCtKHFBZ/1KNTyiuIfbaTacau/PVx+EHgIJNAlt74hyBnrAXbsP eRP90GJMVpaSqW8mnIKL4pHrlxN/HrTHjckRhPaHyNVJkyuv8Pmrhra/Tpuu7+VudRl6 n/Nn9GMvJQb6eCY9CGnPZ9N6q05eAFtI6c5P1ZI+O4raod/csBDsijEH3ahZIMb5/aWL 98J1jPCFeL6OlVa+R5MIf1geqplaN52ILKNaxBFGe0JoKdnqp9IluC7kW6q72dw9Oy+F 9LzQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs19si15552398ejb.398.2021.06.08.07.30.52; Tue, 08 Jun 2021 07:31:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233404AbhFHOak (ORCPT + 99 others); Tue, 8 Jun 2021 10:30:40 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:5295 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233364AbhFHOaU (ORCPT ); Tue, 8 Jun 2021 10:30:20 -0400 Received: from dggeml759-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Fzssx3k5bz1BK2l; Tue, 8 Jun 2021 22:23:33 +0800 (CST) Received: from localhost.localdomain (10.175.102.38) by dggeml759-chm.china.huawei.com (10.1.199.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 8 Jun 2021 22:28:23 +0800 From: Wei Yongjun To: , =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= , Rob Herring , Tomeu Vizoso , David Airlie , Daniel Vetter , Philipp Zabel CC: , , , Hulk Robot Subject: [PATCH -next] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init() Date: Tue, 8 Jun 2021 14:38:56 +0000 Message-ID: <20210608143856.4154766-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.102.38] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeml759-chm.china.huawei.com (10.1.199.138) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 125ed973feaa..a2a09c51eed7 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -54,7 +54,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) {