NetBSD-Bugs archive

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

port-arm/50963: src/sys/arch/arm/nvidia/tegra_gpio.c: 4 * uninit data ?



>Number:         50963
>Category:       port-arm
>Synopsis:       src/sys/arch/arm/nvidia/tegra_gpio.c: 4 * uninit data ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 13 17:25:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160313
>Organization:
>Environment:
>Description:
1.

[src/sys/arch/arm/nvidia/tegra_gpio.c:307]: (error) Uninitialized struct member: gbank.bank_dev
[src/sys/arch/arm/nvidia/tegra_gpio.c:307]: (error) Uninitialized struct member: gbank.bank_gc

Source code is

    gpin = kmem_alloc(sizeof(*gpin), KM_SLEEP);
    gpin->pin_bank = gbank;
    gpin->pin_no = pin;
    gpin->pin_flags = flags;
    gpin->pin_actlo = actlo;

Not sure it is going to make any difference, but it might
be safer better code to use 

    memset(gpin, 0, sizeof(*gpin));

2.

[src/sys/arch/arm/nvidia/tegra_gpio.c:402]: (error) Uninitialized struct member: bank.bank_dev
[src/sys/arch/arm/nvidia/tegra_gpio.c:402]: (error) Uninitialized struct member: bank.bank_gc

Duplicate.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index