Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2011 19:54:56 GMT
From:      Dan McGregor <dan.mcgregor@usask.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/163545: Return of uninitialized value in Chelsio T3 driver
Message-ID:  <201112221954.pBMJsuwo047098@red.freebsd.org>
Resent-Message-ID: <201112222000.pBMK0Qlj020713@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112221954.pBMJsuwo047098>