NetBSD-Bugs archive

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

misc/50785: src/sys/dev/pci/mpii.c:4992: dead code ?



>Number:         50785
>Category:       misc
>Synopsis:       src/sys/dev/pci/mpii.c:4992: dead code ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 08 16:25:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160208
>Organization:
>Environment:
>Description:
[src/sys/dev/pci/mpii.c:4992]: (style) Statements following return, break, continue, goto or throw will never be executed.

Source code is

    if (mpii_req_cfg_page(sc, addr, MPII_PG_POLL, &hdr, 1,
        vpg, pagelen) != 0) {
        rv = EINVAL;
        goto done;
        free(vpg, M_TEMP);
        return (EINVAL);
    }

Maybe better code

    if (mpii_req_cfg_page(sc, addr, MPII_PG_POLL, &hdr, 1,
        vpg, pagelen) != 0) {
        rv = EINVAL;
        free(vpg, M_TEMP);
        goto done;
    }

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index