From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH] spi: fsl-dspi: Remove possible memory leak of 'chip' Date: Sat, 31 Jan 2015 19:46:48 +0300 Message-ID: <20150131164648.GR6507@mwanda> References: <1422722005-1616-1-git-send-email-bhuvanchandra.dv@toradex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, stefan-XLVq0VzYD2Y@public.gmane.org, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bhuvanchandra DV Return-path: Content-Disposition: inline In-Reply-To: <1422722005-1616-1-git-send-email-bhuvanchandra.dv-2KBjVHiyJgBBDgjK7y7TUQ@public.gmane.org> Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Sat, Jan 31, 2015 at 10:03:25PM +0530, Bhuvanchandra DV wrote: > Move the check for spi->bits_per_word > before allocation, to avoid memory leak. > > Signed-off-by: Dan Carpenter Normally, you would give me a Reported-by: tag. Not a big deal either way. > Signed-off-by: Bhuvanchandra DV regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html