NetBSD-Bugs archive

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

kern/53177: src/sys/dev/i2c/xc5k.c:162: missing error checking ?



>Number:         53177
>Category:       kern
>Synopsis:       src/sys/dev/i2c/xc5k.c:162: missing error checking ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 12 18:05:00 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180412
>Organization:
>Environment:
>Description:
src/sys/dev/i2c/xc5k.c:162] -> [src/sys/dev/i2c/xc5k.c:165]: (warning) Identical inner 'if' condition is always true.

Source code is

        if (!error) {
                xc5k_read_2(xc, XC5K_REG_VERSION, &xcversion);
                xc5k_read_2(xc, XC5K_REG_BUILD, &xcbuild);
                if (!error)

Suggest sanity check return value from xc5k_read_2 function
for both calls.

 
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index