From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 01/19] clk: sunxi: Add display clock Date: Fri, 6 Nov 2015 15:39:26 -0800 Message-ID: <20151106233926.GN6114@lukather> References: <1446214865-3972-1-git-send-email-maxime.ripard@free-electrons.com> <1446214865-3972-2-git-send-email-maxime.ripard@free-electrons.com> <20151030212902.GG19782@codeaurora.org> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+FS1wzm/v+2h3Q5" Return-path: Content-Disposition: inline In-Reply-To: <20151030212902.GG19782-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Stephen Boyd Cc: Mike Turquette , David Airlie , Thierry Reding , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Laurent Pinchart , Chen-Yu Tsai , Hans de Goede , Alexander Kaplan , Wynter Woods , Boris Brezillon , Thomas Petazzoni , Rob Clark , Daniel Vetter List-Id: devicetree@vger.kernel.org --x+FS1wzm/v+2h3Q5 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Hi Stephen, Thanks for your feedback! On Fri, Oct 30, 2015 at 02:29:02PM -0700, Stephen Boyd wrote: > > + > > + mux = kzalloc(sizeof(*mux), GFP_KERNEL); > > + if (!mux) > [..] > > + goto free_reset; > > + } > > + > > + return; > > + > > +free_reset: > > + kfree(reset_data); > > +free_clk: > > + clk_unregister(clk); > > We really ought to have a clk_composite_unregister() API. Can we? We can always unregister the clock itself, but do we have a way to retrieve the structure that has been allocated in there? (note that it also applies to the generic clocks registration: muxes, dividers, and so on). Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --x+FS1wzm/v+2h3Q5--