]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: add sanity check to device_property_read_u32_array call
authorColin Ian King <colin.king@canonical.com>
Mon, 17 Jun 2019 16:58:36 +0000 (17:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2019 01:03:38 +0000 (21:03 -0400)
commitf54343ff90b28b7ebd311e3fb66f6ee8068fc0af
treead019ef2b020cfa81c4e8eb4c2d0bd5c48796fcb
parentd13fb42e8d870e054b82cc25f2fdde358dc00592
net: stmmac: add sanity check to device_property_read_u32_array call

Currently the call to device_property_read_u32_array is not error checked
leading to potential garbage values in the delays array that are then used
in msleep delays.  Add a sanity check to the property fetching.

Addresses-Coverity: ("Uninitialized scalar variable")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c