Home
last modified time | relevance | path

Searched hist:"50262 c85" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/
H A Ddwmac-sti.c50262c85 Mon Dec 15 05:25:51 CST 2014 Geert Uytterhoeven <geert@linux-m68k.org> net: stmmac: sti: Fix uninitialized pointer dereference if !OF

If CONFIG_OF is not set:

drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c: In function ‘sti_dwmac_parse_data’:
drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c:318: warning: ‘rs’ is used uninitialized in this function

of_property_read_string() will return -ENOSYS in this case, and rs will
be an uninitialized pointer.

While the fallback clock selection is already selected correctly in this
case, the string comparisons should be skipped too, else the system will
crash while dereferencing the uninitialized pointer.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
50262c85 Mon Dec 15 05:25:51 CST 2014 Geert Uytterhoeven <geert@linux-m68k.org> net: stmmac: sti: Fix uninitialized pointer dereference if !OF

If CONFIG_OF is not set:

drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c: In function ‘sti_dwmac_parse_data’:
drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c:318: warning: ‘rs’ is used uninitialized in this function

of_property_read_string() will return -ENOSYS in this case, and rs will
be an uninitialized pointer.

While the fallback clock selection is already selected correctly in this
case, the string comparisons should be skipped too, else the system will
crash while dereferencing the uninitialized pointer.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>