From: Michael Chan <michael.chan@broadcom.com>
To: David Miller <davem@davemloft.net>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Netdev <netdev@vger.kernel.org>,
open list <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()'
Date: Tue, 28 Nov 2017 09:11:55 -0800 [thread overview]
Message-ID: <CACKFLinbowscXBnaHmTQ-f8SEO1j4ObTW5N5R1G6eLnXS2POfw@mail.gmail.com> (raw)
In-Reply-To: <20171128.105602.879657812684686339.davem@davemloft.net>
On Tue, Nov 28, 2017 at 7:56 AM, David Miller <davem@davemloft.net> wrote:
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 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 <christophe.jaillet@wanadoo.fr>
>
> 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.
Sorry I was on vacation and missed this earlier. The reason we don't
check for errors in the 2nd part is that the 2nd page may not be
present on some eeproms.
But I think the patch is fine because we return the proper length in
.get_module_info(). So we will now return error only if the user
specifies an invalid length, which is fine. Thanks.
prev parent reply other threads:[~2017-11-28 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 19:46 [PATCH] bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()' Christophe JAILLET
2017-11-23 17:31 ` David Miller
2017-11-28 15:56 ` David Miller
2017-11-28 17:11 ` Michael Chan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACKFLinbowscXBnaHmTQ-f8SEO1j4ObTW5N5R1G6eLnXS2POfw@mail.gmail.com \
--to=michael.chan@broadcom.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).