From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754064AbdK1P4J (ORCPT ); Tue, 28 Nov 2017 10:56:09 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:43638 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbdK1P4F (ORCPT ); Tue, 28 Nov 2017 10:56:05 -0500 Date: Tue, 28 Nov 2017 10:56:02 -0500 (EST) Message-Id: <20171128.105602.879657812684686339.davem@davemloft.net> To: christophe.jaillet@wanadoo.fr Cc: michael.chan@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()' From: David Miller In-Reply-To: <20171121194649.11724-1-christophe.jaillet@wanadoo.fr> References: <20171121194649.11724-1-christophe.jaillet@wanadoo.fr> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 28 Nov 2017 07:56:05 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET Date: Tue, 21 Nov 2017 20:46:49 +0100 > Error code returned by 'bnxt_read_sfp_module_eeprom_info()' is handled a > few lines above when reading the A0 portion of the EEPROM. > The same should be done when reading the A2 portion of the EEPROM. > > In order to correctly propagate an error, update 'rc' in this 2nd call as > well, otherwise 0 (success) is returned. > > Signed-off-by: Christophe JAILLET Patch applied, thanks Chrisophe. I cannot see any legitimate reason to ignore errors returned here, as an error would mean a partial read back of the data to the caller.