Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbcDULCf (ORCPT ); Thu, 21 Apr 2016 07:02:35 -0400 Received: from mga09.intel.com ([134.134.136.24]:26979 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbcDULCe (ORCPT ); Thu, 21 Apr 2016 07:02:34 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,512,1455004800"; d="scan'208";a="937141680" Message-ID: <1461236614.6620.312.camel@linux.intel.com> Subject: Re: [PATCH v2] i2c: designware-platdrv: fix unbalanced clk enable and prepare From: Andy Shevchenko To: Jisheng Zhang , jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, wsa@the-dreams.de Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Thu, 21 Apr 2016 14:03:34 +0300 In-Reply-To: <1461230811-7495-1-git-send-email-jszhang@marvell.com> References: <1461230811-7495-1-git-send-email-jszhang@marvell.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 714 Lines: 32 On Thu, 2016-04-21 at 17:26 +0800, Jisheng Zhang wrote: > If i2c_dw_probe() fail, we should disable and unprepare the clk, clk -> clock, or use function name explicitly. > otherwise the clk enable and prepare is left unbalanced. > Ditto. > In dw_i2c_plat_remove(), we'd better to not rely on rpm to disable > and unprepare the clk since CONFIG_PM may be disabled when configuring Ditto. > the kernel. So we explicitly disable and unprepare the clk in Ditto. > dw_i2c_plat_remove(). > + pm_runtime_put_noidle(&pdev->dev); >   > - pm_runtime_put_sync(&pdev->dev); > This change also needs to be described in the commit message. -- Andy Shevchenko Intel Finland Oy