Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9107074pxu; Mon, 28 Dec 2020 06:49:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqr7MCSiukuYL3Wg9lDt3sqqoP8b74qiHHcFkiXpjIZ73b2jhbESzUVM3TXH+iN048Sd0E X-Received: by 2002:a05:6402:1d13:: with SMTP id dg19mr42365458edb.111.1609166964087; Mon, 28 Dec 2020 06:49:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166964; cv=none; d=google.com; s=arc-20160816; b=Bm6ZlYWTRts5U9b4Um1hi+/nhuRRGydtFtDUe1N2OWp68UV6gTvRtIFL5AXFkfZIhC FDn5uCa3DQQXuyh+PZ+Gv4KWQ+YE9IzyekFW34V4fgTqOb/22efZPO/K57YlCGrFSTux xL2/sVQ1+yxYYjm5jvsvKVfUItEFPW5ViYdi2J7d4CSrHNTTqUJjdShJ5C8DMUrupKjT mUMnS/WpNEEjnZ6fZd6eBbzHXR4ZAY0eyfLnoHabF5GhkYTvPIWZ+AKFguJdaXK75ZAj R1heVPPSgPSz6Q5Qalz02lg48BYll9VcX0EyncBKAhvz9mn5ALTNsoupYM3fE+zZbbge DEgQ== 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=C0/tW/J+QBm7ixj85qy5whqOSjooK2B6k/PtZZ7L5dU=; b=UBLUZpqeuEzKMemtssZnUMvGSfY8guSTc//3LMlthQCdaxjayHc7m5E1Ncxq9qJZOA XhooBxvN1uXQRLDEC7w46G5qIvlfgHuPhWejkfbfY583DsgdjuitoGG46FwHn2VZyihz S7eo9+pVyrbWgMYzf+x4KoD0vFNqv9CYXQlKSm7x+3Gz4JHr36c47Bi4RGeE2GNN49TQ pCB6dj39TToI3GRUD7ligqOOH9Jj47Lf30d/GhRHTLvDzMe44NbP8Mq27X3DwhQSDUjw //PkRBI2gMIKJ3yti/I2/vKBOkj2y++Ar5KaU6zncKBIozwm7OuqSx0FhQuzoRDCZwnC V/xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a9aPrI2P; 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 e28si17588368edj.216.2020.12.28.06.49.01; Mon, 28 Dec 2020 06:49:24 -0800 (PST) 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=a9aPrI2P; 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 S2392314AbgL1OrZ (ORCPT + 99 others); Mon, 28 Dec 2020 09:47:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:59708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502843AbgL1OXj (ORCPT ); Mon, 28 Dec 2020 09:23:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C06D9221F0; Mon, 28 Dec 2020 14:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165379; bh=9NahrlYyNAdZZ/yKDuE0CcW/q+WhkGrcf3ZkyE8qS/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a9aPrI2PnqVo28Gjv8JXbZptgLzUsGugxzNF8xN+GiJh0vwobIfbq/y+SU7ltE9hu NLgP6P7ikurSUEQY/c/Y/B/9Ve72VdIg/I8JIFwzKCCTx1W/eA5HOfLcqZ+rnAnrfq UiyUSY3SrU1YIwsbzd0X600ph0jsBcdPy7IkjCvY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Shawn Guo , Thierry Reding , Sasha Levin Subject: [PATCH 5.10 479/717] pwm: zx: Add missing cleanup in error path Date: Mon, 28 Dec 2020 13:47:57 +0100 Message-Id: <20201228125043.916154515@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Uwe Kleine-König [ Upstream commit 269effd03f6142df4c74814cfdd5f0b041b30bf9 ] zx_pwm_probe() called clk_prepare_enable() before; this must be undone in the error path. Fixes: 4836193c435c ("pwm: Add ZTE ZX PWM device driver") Signed-off-by: Uwe Kleine-König Acked-by: Shawn Guo Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/pwm/pwm-zx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-zx.c b/drivers/pwm/pwm-zx.c index e2c21cc34a96a..3763ce5311ac2 100644 --- a/drivers/pwm/pwm-zx.c +++ b/drivers/pwm/pwm-zx.c @@ -238,6 +238,7 @@ static int zx_pwm_probe(struct platform_device *pdev) ret = pwmchip_add(&zpc->chip); if (ret < 0) { dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret); + clk_disable_unprepare(zpc->pclk); return ret; } -- 2.27.0