We will want to use this same logic in another place within iter_inc(), so split it out into its own function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>