]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: dwmac-sti: fix st,tx-retime-src check
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Thu, 26 Nov 2015 07:35:43 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2015 19:52:51 +0000 (14:52 -0500)
commit5008b893e094c12c2c40177032c9e17e95033e82
tree9cd77062ee24d05bd9d7222783e04af4b29adea8
parent11d9a5f6d92faec47402cc387139a90dc6f80dd9
stmmac: dwmac-sti: fix st,tx-retime-src check

In case of the st,tx-retime-src is missing from device-tree
(it's an optional field) the driver will invoke the strcasecmp to check
which clock has been selected and this is a bug; the else condition
is needed.

In the dwmac_setup, the "rs" variable, passed to the strcasecmp, was not
initialized and the compiler, depending on the options adopted, could
take it in some different part of the stack generating the hang in such
configuration.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c