On Tue, 3 Mar 2020 at 16:51, Emil Velikov <emil.l.velikov@xxxxxxxxx> wrote: > > + objs = drm_gem_object_lookup(file, mode_cmd->handles[0]); > > + if (!objs) { > > + DRM_DEBUG_KMS("Failed to lookup GEM object\n"); > > + return ERR_PTR(-EINVAL); > > + } > > > > - objs = drm_gem_object_lookup(file, mode_cmd->handles[0]); > > - if (!objs) { > > - DRM_DEBUG_KMS("Failed to lookup GEM object\n"); > > - return false; > > - } > > + if (objs->size < afbc_size) { > > + DRM_DEBUG_KMS("buffer size (%zu) too small for AFBC buffer size = %u\n", > > + objs->size, afbc_size); > > + drm_gem_object_put_unlocked(objs); > > + return ERR_PTR(-EINVAL); > > + } > > > We're missing the drm_gem_object_put_unlocked() after the if block. > Please ignore this comment - it's there, I'm simply blind :-\ -Emil _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel