struct drm_mm_node *hole;
u64 hole_start, hole_end;
+ if (WARN_ON(node->size == 0))
+ return -EINVAL;
+
end = node->start + node->size;
/* Find the relevant hole to add our node to */
{
struct drm_mm_node *hole_node;
+ if (WARN_ON(size == 0))
+ return -EINVAL;
+
hole_node = drm_mm_search_free_generic(mm, size, alignment,
color, sflags);
if (!hole_node)
{
struct drm_mm_node *hole_node;
+ if (WARN_ON(size == 0))
+ return -EINVAL;
+
hole_node = drm_mm_search_free_in_range_generic(mm,
size, alignment, color,
start, end, sflags);