Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755315AbcCULyh (ORCPT ); Mon, 21 Mar 2016 07:54:37 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38574 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754638AbcCULyY (ORCPT ); Mon, 21 Mar 2016 07:54:24 -0400 Date: Mon, 21 Mar 2016 11:54:19 +0000 From: Lee Jones To: Stephen Boyd Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path Message-ID: <20160321115419.GD4140@x1> References: <1455871331-93095-1-git-send-email-andriy.shevchenko@linux.intel.com> <20160227005856.GD28849@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160227005856.GD28849@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 29 On Fri, 26 Feb 2016, 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. You may also want to use > devm_clk_register() instead so that cleanup is easier. I'm going to apply your Ack in order to show that you've seen and have no problems with the patch. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog