Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753636Ab2FRCy3 (ORCPT ); Sun, 17 Jun 2012 22:54:29 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:59323 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730Ab2FRCy2 convert rfc822-to-8bit (ORCPT ); Sun, 17 Jun 2012 22:54:28 -0400 MIME-Version: 1.0 Reply-To: axel.lin@gmail.com In-Reply-To: <3920966.545511339987371711.JavaMail.weblogic@epml17> References: <3920966.545511339987371711.JavaMail.weblogic@epml17> From: Axel Lin Date: Mon, 18 Jun 2012 10:54:07 +0800 Message-ID: Subject: Re: [PATCH] extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove() To: myungjoo.ham@samsung.com Cc: "linux-kernel@vger.kernel.org" , =?UTF-8?B?7LWc7LCs7Jqw?= , =?UTF-8?B?67CV6rK966+8?= , Greg Kroah-Hartman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 19 2012/6/18 함명주 : >> extcon_dev_unregister(info->edev) doest not free info->edev, we need to call >> kfree(info->edev) here. >> >> Signed-off-by: Axel Lin > > The patch is correct. > > However, using devm_kzalloc at probe and removing kfree at remove appears to be much better. Yes, But I think Greg may prefer this one-linear for 3.5. And another patch for the devm_kcalloc conversion for 3.6. Regards, Axel -- 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/