We need list_for_each_entry_safe in dev_remove_bb_dev since the list entries are removed during iteration over the list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Alexander Aring <alex.aring@gmail.com>