/* Iterate to next block in device-path, terminating (returning NULL) at /End* node.  */
struct efi_device_path* efi_dp_next(const struct efi_device_path *dp)
/* Iterate to next block in device-path, terminating (returning NULL) at /End* node.  */
struct efi_device_path* efi_dp_next(const struct efi_device_path *dp)
{
	if (dp == NULL)
		return NULL;
	if (dp->type == DEVICE_PATH_TYPE_END)
		return NULL;
	dp = ((void *)dp) + dp->length;
	if (dp->type == DEVICE_PATH_TYPE_END)
		return NULL;
	return (struct efi_device_path *)dp;
}