From: Stephen Hemminger <shemminger@vyatta.com>
To: Greg Thelen <gthelen@google.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sky2: avoid using uninitialized variable
Date: Mon, 13 Jun 2011 18:12:12 -0400 [thread overview]
Message-ID: <20110613181212.571f8e76@s6510.ftrdhcpuser.net> (raw)
In-Reply-To: <xr93vcw9s9zc.fsf@gthelen.mtv.corp.google.com>
On Mon, 13 Jun 2011 14:21:59 -0700
Greg Thelen <gthelen@google.com> wrote:
> I am not sure if 0 or ~0 would be a better choice in the gm_phy_read()
> error case. I used 0. A more complete solution might be to plumb up
> error handling to the callers of gm_phy_read().
>
> ==
> From 37486219a3d93881f3b2619a4b2bb21be62db7d4 Mon Sep 17 00:00:00 2001
> From: Greg Thelen <gthelen@google.com>
> Date: Mon, 13 Jun 2011 14:09:07 -0700
> Subject: [PATCH] sky2: avoid using uninitialized variable
>
> Prior to this change gm_phy_read() could return an uninitialized
> variable if __gm_phy_read() failed.
>
> This change returns zero in the failure case.
>
> Signed-off-by: Greg Thelen <gthelen@google.com>
Shouldn't the callers be changed to check rather than just returning
0 and masking the problem.
next prev parent reply other threads:[~2011-06-13 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-13 21:21 Greg Thelen
2011-06-13 22:12 ` Stephen Hemminger [this message]
2011-06-14 0:34 ` Greg Thelen
2011-06-14 4:02 ` Stephen Hemminger
2011-06-17 3:10 ` David Miller
2011-06-17 3:51 ` Ben Hutchings
2011-06-17 3:58 ` David Miller
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=20110613181212.571f8e76@s6510.ftrdhcpuser.net \
--to=shemminger@vyatta.com \
--cc=gthelen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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
all inboxes | Powered by JetHome®