diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-26 11:43:30 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-26 22:13:12 +0200 |
commit | c1a495a558536c5745c6449f7c04ba3cf40be9da (patch) | |
tree | 84a668dca5b928c1dbfffcef7672734e0a2656a9 /drivers/gpu/drm/drm_mm.c | |
parent | drm/virtio: drop DRM_AUTH usage from the driver (diff) | |
download | linux-c1a495a558536c5745c6449f7c04ba3cf40be9da.tar.xz linux-c1a495a558536c5745c6449f7c04ba3cf40be9da.zip |
drm: Allow range of 0 for drm_mm_insert_node_in_range()
We gracefully handle the caller specifying a zero range, so don't force
them to special case that condition if it naturally falls out of their
setup. What we don't check is if the end < start, so keep that as an
assert for an illegal call.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190626094330.3556-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/drm_mm.c')
-rw-r--r-- | drivers/gpu/drm/drm_mm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 9a59865ce574..4581c5387372 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -472,7 +472,7 @@ int drm_mm_insert_node_in_range(struct drm_mm * const mm, u64 remainder_mask; bool once; - DRM_MM_BUG_ON(range_start >= range_end); + DRM_MM_BUG_ON(range_start > range_end); if (unlikely(size == 0 || range_end - range_start < size)) return -ENOSPC; |