From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751425AbcCFLKL (ORCPT ); Sun, 6 Mar 2016 06:10:11 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:60912 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751203AbcCFLKE (ORCPT ); Sun, 6 Mar 2016 06:10:04 -0500 Date: Sun, 6 Mar 2016 12:09:44 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Nicholas Krause Cc: davem@davemloft.net, B38611@freescale.com, andrew@lunn.ch, fabio.estevam@freescale.com, l.stach@pengutronix.de, rmk+kernel@arm.linux.org.uk, tremyfr@gmail.com, johannes@sipsolutions.net, haokexin@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] net:fec:Fix error checking in the function fec_enet_init Message-ID: <20160306110944.GZ20323@pengutronix.de> References: <1457121614-9360-1-git-send-email-xerofoify@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1457121614-9360-1-git-send-email-xerofoify@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Nicholas, On Fri, Mar 04, 2016 at 03:00:14PM -0500, Nicholas Krause wrote: > This fixes error checking in the function fec_enet_init to properly > check if the internal call to the function fec_enet_alloc_queue fails > and if so immediately return the error code to the caller for it to > handle it's own intended error paths. > > Signed-off-by: Nicholas Krause Looks right. There seem to be some more oportunities for similar patches. E.g. if dmam_alloc_coherent fails the effects of fec_enet_alloc_queue should be undone. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |