From: Takashi Iwai Subject: Re: [PATCH] ppc-beep - handle errors from input_register_device() Date: Thu, 03 Aug 2006 15:24:31 +0200 Message-ID: References: <200608012305.55101.dtor@insightbb.com> <200608021957.06811.dtor@insightbb.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 6B362221 for ; Thu, 3 Aug 2006 15:24:38 +0200 (MEST) In-Reply-To: <200608021957.06811.dtor@insightbb.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Dmitry Torokhov Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 2 Aug 2006 19:57:06 -0400, Dmitry Torokhov wrote: > > On Wednesday 02 August 2006 12:18, Takashi Iwai wrote: > > BTW, does one need to input_free_device() after > > input_unregister_device()? > > > > No, input_free_device() must not be called after input_unregister_device() > because the input_unregister_device() frees memory if it was the last > reference. Thanks, that I supposed, too. > That's why I like to have input_register_device last. > To keep error path tidy you may either grab and extra reference via > input_get_device() or just set input_dev to NULL - input_free_device > handles NULLs just fine. OK, I committed your patch together with other fixes to ALSA tree. Thanks! Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV