On Wed, Jul 18, 2018 at 11:14:04AM +0200, Nicholas Mc Guire wrote:
> drm_legacy_ctxbitmap_next() returns idr_alloc() which can return
> -ENOMEM, -EINVAL or -ENOSPC none of which are -1. since drm_context_t
> is an unsigned int an intermediate variable is used to handle the
> error cases, and then c
drm_legacy_ctxbitmap_next() returns idr_alloc() which can return
-ENOMEM, -EINVAL or -ENOSPC none of which are -1. since drm_context_t
is an unsigned int an intermediate variable is used to handle the
error cases, and then cast to drm_context_t after ensuring that the
value is >= 0. The explicit ca