Thread (7 messages) flat view 7 messages, 4 authors, 2011-06-17

Re: [PATCH] sky2: avoid using uninitialized variable

From: Stephen Hemminger <hidden>
Date: 2011-06-13 22:12:14
Also in: lkml

On Mon, 13 Jun 2011 14:21:59 -0700
Greg Thelen [off-list ref] 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 <redacted>
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 <redacted>
Shouldn't the callers be changed to check rather than just returning
0 and masking the problem.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help