From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com ([192.55.52.88]:54415 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbcB2KQF (ORCPT ); Mon, 29 Feb 2016 05:16:05 -0500 Message-ID: <1456741007.13244.159.camel@linux.intel.com> Subject: Re: [PATCH v2 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path From: Andy Shevchenko To: Stephen Boyd Cc: Lee Jones , linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Mon, 29 Feb 2016 12:16:47 +0200 In-Reply-To: <20160227005856.GD28849@codeaurora.org> References: <1455871331-93095-1-git-send-email-andriy.shevchenko@linux.intel.com> <20160227005856.GD28849@codeaurora.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Fri, 2016-02-26 at 16:58 -0800, Stephen Boyd wrote: > On 02/19, Andy Shevchenko wrote: > > There is a potential resource leak in case when ->probe() fails. We > > have to > > unregister and remove clock tree which is done here. > > > > This is a follow up to previously pushed commit c4726abce63b ("mfd: > > intel_quark_i2c_gpio: Use clkdev_create()") that prevents double > > free() when > > clkdev_drop() followed by kfree() in devm_kcalloc() release stage. > > > > I leave Fixes tag here, but the backporting will require to > > backport the commit > > c4726abce63b ("mfd: intel_quark_i2c_gpio: Use clkdev_create()") > > first. > > > > Fixes: 60ae5b9f5cdd (mfd: intel_quark_i2c_gpio: Add Intel Quark > > X1000 I2C-GPIO MFD Driver) > > Cc: stable@vger.kernel.org > > Signed-off-by: Andy Shevchenko > > --- > > Both look fine to me. Thanks for review! > You may also want to use > devm_clk_register() instead so that cleanup is easier. Perhaps in the future. -- Andy Shevchenko Intel Finland Oy