net/failsafe: safer subdev iterator
authorGaetan Rivet <gaetan.rivet@6wind.com>
Wed, 23 Aug 2017 13:05:30 +0000 (15:05 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000 (02:49 +0200)
commit495ca7888ad94d43d8ba477ab0c1bb319d3f66a3
treef617ebbfae83c03ac28ec04f7830430d90f02192
parent7f4a1aa1430d085b80b6a483aac0e729a0b4f6df
net/failsafe: safer subdev iterator

The sub_device iterator macro should follow the general gist of the
tailq API for an easier understanding and safer use.

Once the loop has finished, the iterator should be set to NULL.
If no sub_device was iterated upon, the iterator should still be NULL.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_private.h