kern/163545: Return of uninitialized value in Chelsio T3 driver

Dan McGregor dan.mcgregor at usask.ca
Thu Dec 22 20:00:27 UTC 2011


>Number:         163545
>Category:       kern
>Synopsis:       Return of uninitialized value in Chelsio T3 driver
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 22 20:00:26 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Dan McGregor
>Release:        9.0-PRERELEASE
>Organization:
>Environment:
FreeBSD shadrach.dyndns.org 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #8 r228275: Mon Dec  5 14:05:35 CST 2011     dan at shadrach.dyndns.org:/usr/obj/usr/src9/sys/SHADRACH  amd64

>Description:
In the Chelsio T3 driver there is an uninitialized value returned by aq100x_power_down in sys/dev/cxgb/common/cxgb_aq100x.c.  It appears that the intended return value is err, not v.
>How-To-Repeat:
I don't know of any problems that develop because of this problem, though it seems that it's possible for it to fail.
>Fix:
It looks like the value that should be returned is err, not (v).


Index: sys/dev/cxgb/common/cxgb_aq100x.c
===================================================================
--- sys/dev/cxgb/common/cxgb_aq100x.c   (révision 228798)
+++ sys/dev/cxgb/common/cxgb_aq100x.c   (copie de travail)
@@ -232,7 +232,7 @@
        err = t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, BMCR_PDOWN,
            off ? BMCR_PDOWN : 0);
        if (err || off)
-               return (v);
+               return (err);
 
        msleep(300);
        do {


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list