Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755055AbdLOETe (ORCPT ); Thu, 14 Dec 2017 23:19:34 -0500 Received: from mga03.intel.com ([134.134.136.65]:49001 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754942AbdLOETc (ORCPT ); Thu, 14 Dec 2017 23:19:32 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,402,1508828400"; d="scan'208";a="12746477" Date: Fri, 15 Dec 2017 09:53:20 +0530 From: Vinod Koul To: Andreas Platschek Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, sil2review@lists.osadl.org Subject: Re: [PATCH v3] dmaengine: fsl-edma: disable clks on all error paths Message-ID: <20171215042319.GB18649@localhost> References: <20171214115051.27915-1-andreas.platschek@opentech.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171214115051.27915-1-andreas.platschek@opentech.at> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 708 Lines: 18 On Thu, Dec 14, 2017 at 12:50:51PM +0100, Andreas Platschek wrote: > Previously enabled clks are only disabled if clk_prepare_enable() fails. > However, there are other error paths were the previously enabled > clocks are not disabled. > > To fix the problem, fsl_disable_clocks() now takes the number of clocks > that shall be disabled + unprepared. For existing calls were all clocks > were already successfully prepared + enabled, DMAMUX_NR is passed to > disable + unprepare all clocks. > > In error paths were only some clocks were successfully prepared + > enabled the loop counter is passed, in order to disable + unprepare > all successfully prepared + enabled clocks. Applied, thanks -- ~Vinod