NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/45995: Use the right return value.



>Number:         45995
>Category:       kern
>Synopsis:       Use the right return value.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 12 11:30:00 +0000 2012
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Return value false.
Founf by clang.
>How-To-Repeat:

>Fix:
diff -u -p -r1.2 ar5212_misc.c
--- sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c      7 Mar 2011 
11:25:43 -0000       1.2
+++ sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c      5 Feb 2012 
07:37:35 -0000
@@ -570,7 +570,7 @@ ar5212SetDecompMask(struct ath_hal *ah, 
        struct ath_hal_5212 *ahp = AH5212(ah);
 
         if (keyidx >= HAL_DECOMP_MASK_SIZE)
-                return HAL_EINVAL; 
+                return AH_FALSE; 
         OS_REG_WRITE(ah, AR_DCM_A, keyidx);
         OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0);
         ahp->ah_decompMask[keyidx] = en;



Home | Main Index | Thread Index | Old Index