Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751494AbbEFLKK (ORCPT ); Wed, 6 May 2015 07:10:10 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:54243 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbbEFLKG (ORCPT ); Wed, 6 May 2015 07:10:06 -0400 Date: Wed, 6 May 2015 12:09:56 +0100 From: Russell King - ARM Linux To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Stephen Boyd , Mike Turquette , Lee Jones , Bryan Huntsman , Lorenzo Pieralisi , Ralf Baechle , Sylwester Nawrocki , Tomeu Vizoso Subject: Re: [PATCH v4 1/1] clkdev: change prototype of clk_register_clkdev() Message-ID: <20150506110956.GN2067@n2100.arm.linux.org.uk> References: <1430907852-160833-1-git-send-email-andriy.shevchenko@linux.intel.com> <1430907852-160833-2-git-send-email-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430907852-160833-2-git-send-email-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1052 Lines: 23 On Wed, May 06, 2015 at 01:24:12PM +0300, 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. clk_register_clkdev() is there to assist mass clock registrations, which typically happen in platform code. It's there to simplify the "I need to register this clock which I'm not going to release again". I don't see any of these locations trying to unregister their clk from clkdev, so I doubt this patch is needed. Where a module wants to remove its clk from clkdev, it should register its clk with clkdev_create() and remove it with clkdev_drop(). -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/