From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161223AbbBDXSv (ORCPT ); Wed, 4 Feb 2015 18:18:51 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:58596 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755804AbbBDXSt (ORCPT ); Wed, 4 Feb 2015 18:18:49 -0500 Message-ID: <54D2A8D7.6030806@codeaurora.org> Date: Wed, 04 Feb 2015 15:18:47 -0800 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Andy Shevchenko , linux-kernel@vger.kernel.org, Mike Turquette , Lee Jones , Bryan Huntsman , Lorenzo Pieralisi , Ralf Baechle , Sylwester Nawrocki CC: Tomeu Vizoso Subject: Re: [PATCH v1] clkdev: change prototype of clk_register_clkdev() References: <1422987534-21832-1-git-send-email-andriy.shevchenko@linux.intel.com> <1422987534-21832-2-git-send-email-andriy.shevchenko@linux.intel.com> In-Reply-To: <1422987534-21832-2-git-send-email-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/03/15 10:18, Andy Shevchenko wrote: > Since clk_register_clkdev() is exported for modules the caller should get a > pointer to the allocated resources. Otherwise the memory leak is guaranteed on > the ->remove() stage. > > Cc: Tomeu Vizoso > Signed-off-by: Andy Shevchenko The idea seems ok to me. Please Cc Russell on the next version. It would also be good to make a note that this patch doesn't attempt to fix any memory leaks that may exist by adding calls to clkdev_drop(). -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project