]> git.baikalelectronics.ru Git - uboot.git/commit
net: Only call halt on a driver that has been init'ed
authorJoe Hershberger <joe.hershberger@ni.com>
Mon, 2 Jul 2018 19:47:46 +0000 (14:47 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 26 Jul 2018 19:08:17 +0000 (14:08 -0500)
commitc87927bdf261932fb7ac30ee282e5075705ad9a5
tree400d605d09042c36631d7aeeaa84ec427e56db3f
parent2ed36ba9d5f91426e9c5f063b9c8b81f5864eaa6
net: Only call halt on a driver that has been init'ed

With driver model, we were not checking if the state of the device was
marked as active before calling the halt function. Check that the device
is probed and also marked as active. This avoids the case where we were
calling halt on the first device in net_init() and the driver would
operate on bogus data structures causing problems. In this case, the
priv was all 0, so halt() would close STDIN.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
net/eth-uclass.c