Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9170462pxu; Mon, 28 Dec 2020 08:19:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKjWL6D4iIKVXJ9oE6N5deNuj5EkKcr3mrQqDpDFYlnrEHacd//n6kYga4RXRByw3RNGma X-Received: by 2002:a05:6402:d09:: with SMTP id eb9mr42264712edb.71.1609172357937; Mon, 28 Dec 2020 08:19:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172357; cv=none; d=google.com; s=arc-20160816; b=mpwWYyWi1Sz8agUOSKdWUlZ1incTyZLLWSG586O9gxrfVQi2Aw/iw8QI2ABNByxilN ogXev6qkdBS6DOtmYQYIrmKMG6qJN4gO1KmC2jMnFQCptcTT0VGa18RRodoh9VYNC6Et QjvwyTHnYNPRF561/3zDPVeUZ6/9l9cKFGGV+wDmB00EZNJVoIStV/PJubxrU2e8vgxy n3nO5erXnQ8soQ1BDpc80mr91ok91VOEVJk/0SEXsFpHHaCpeqWTwgWHxKqwJ2nGvHBZ NFNsiBA3oCuEPCMxDJnFMSyEIJEDZuf/SLMthyvfFaPrCD5/LADzK22EBumC/m08XmYJ otPQ== 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=rpejp6AJPztUTLq2zHeqwHa21zOKIlceP7xWDa0mqDg=; b=kjBhq1VkHBBDVx9ItAvLvt1XG5pf3K3McpweKxQIZzbJfJL/8rknQLV+xYdwKLzYSb pQgZ2wRo54FS8I6E07MtrY0te68DglzAIvq+F+ONw7RuRl0ti/PTsv6nG4fTRDX2nX+5 dWOJ1yOrQztdSBMQ+No7cMM93+vgdMyf/Bfyo+51QgdG4Scybi0PCH9cXwiTAekO/TPi dapdtSvSEh1bxBCvlP4Rfpt75pOCaxR3ZZRQAxRGCI2PsvYS4YJK9mvsZo2XWlJA+e2d Rq3fZ16+pc99ScBbYWrE81voRoLvxv7VpFGhGEIe/uB9E7b1KzhqvMveGpYh1plmmsD7 Kfrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Asduomim; 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 e5si20099628edc.19.2020.12.28.08.18.54; Mon, 28 Dec 2020 08:19:17 -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=Asduomim; 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 S1733303AbgL1NRE (ORCPT + 99 others); Mon, 28 Dec 2020 08:17:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:44004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733153AbgL1NQR (ORCPT ); Mon, 28 Dec 2020 08:16:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B57BD208D5; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161362; bh=fWQJ8GJNj4rZDgu6T4wbPlxyJHgCU5LZGAH2iFSLVAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Asduomims+HqGpwt2Cd0AUe4WN0Xl8tk0lhe8b6fQ5eAS8bVlmQ6kYHzosrAtFXbS cVyfdTnJY8lhOx1JcjP+FUqhwlzOw6LC+iuKo3TKgk+EELMPIW1dE6xCUIdqBcHBVH QmqkqQjVR+h7GMMmoZ4N5h7ShcLk/sPJRcNMPj2M= 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 4.14 171/242] pwm: zx: Add missing cleanup in error path Date: Mon, 28 Dec 2020 13:49:36 +0100 Message-Id: <20201228124913.116534218@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 5d27c16edfb13..0d4112410b69d 100644 --- a/drivers/pwm/pwm-zx.c +++ b/drivers/pwm/pwm-zx.c @@ -241,6 +241,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