From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755523Ab1ILL67 (ORCPT ); Mon, 12 Sep 2011 07:58:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44867 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755252Ab1ILL66 (ORCPT ); Mon, 12 Sep 2011 07:58:58 -0400 Date: Mon, 12 Sep 2011 13:58:57 +0200 Message-ID: From: Takashi Iwai To: Axel Lin Cc: linux-kernel@vger.kernel.org, Johannes Berg , Wolfram Sang , Jaroslav Kysela , alsa-devel@alsa-project.org Subject: Re: [PATCH v2] ALSA: aoa: Remove obsolete cleanup for clientdata In-Reply-To: <1315566285.2453.1.camel@phoenix> References: <1315566285.2453.1.camel@phoenix> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 09 Sep 2011 19:04:45 +0800, Axel Lin wrote: > > The i2c core will clear the clientdata pointer automatically. > We don't have to set the `data' field to NULL in remove() or > if probe() failed anymore. > > Also remove a unneeded NULL checking for kfree. > > Signed-off-by: Axel Lin > Reviewed-by: Wolfram Sang Applied now. Thanks. Takashi > --- > sound/aoa/codecs/onyx.c | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c > index 3687a6c..762af68 100644 > --- a/sound/aoa/codecs/onyx.c > +++ b/sound/aoa/codecs/onyx.c > @@ -1067,7 +1067,6 @@ static int onyx_i2c_probe(struct i2c_client *client, > printk(KERN_DEBUG PFX "created and attached onyx instance\n"); > return 0; > fail: > - i2c_set_clientdata(client, NULL); > kfree(onyx); > return -ENODEV; > } > @@ -1112,8 +1111,7 @@ static int onyx_i2c_remove(struct i2c_client *client) > > aoa_codec_unregister(&onyx->codec); > of_node_put(onyx->codec.node); > - if (onyx->codec_info) > - kfree(onyx->codec_info); > + kfree(onyx->codec_info); > kfree(onyx); > return 0; > } > -- > 1.7.4.1 > > >