From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752779Ab2FLLwU (ORCPT ); Tue, 12 Jun 2012 07:52:20 -0400 Received: from db3ehsobe003.messaging.microsoft.com ([213.199.154.141]:31620 "EHLO db3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752395Ab2FLLwT (ORCPT ); Tue, 12 Jun 2012 07:52:19 -0400 X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPV:NLI;H:mail.freescale.net;RD:none;EFVD:NLI X-SpamScore: -3 X-BigFish: VS-3(zz98dI9371I1432Izz1202hzz8275bh8275dhz2dh2a8h668h839h944hd25hf0ah) Date: Tue, 12 Jun 2012 19:50:34 +0800 From: Dong Aisheng To: Linus Walleij CC: Devendra Naga , Dong Aisheng , Shawn Guo , Subject: Re: [PATCH 1/2] pinctrl: pinctrl-mxs: Take care of frees if the kzalloc fails Message-ID: <20120612115033.GG25534@shlinux2.ap.freescale.net> References: <1339243283-28068-1-git-send-email-devendra.aaru@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 12, 2012 at 01:31:25PM +0200, Linus Walleij wrote: > On Sat, Jun 9, 2012 at 2:01 PM, Devendra Naga wrote: > > > if there is no purecfg , the group pointer is allocated using kzalloc and if it > > fails to allocate, we wont free the new_map, > > > > if config is true, we call kmemdup and if it > > fails to do so we wont free the allocated group if there is no purecfg. > > > > fix this by doing the frees of new_map pointer and group pointers. > > > > Signed-off-by: Devendra Naga > > Obviously correct so applied. > > Dong, Shawn: any ACKs? > Acked-by: Dong Aisheng Regards Dong Aisheng