Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/mgag200: Remove unecessary NULL check in bo_unref

ttm_bo_unref unconditionally calls kref_put on it's argument, so the
thing can't be NULL without already causing Oopses.

Spotted by coverity.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

+1 -3
+1 -3
drivers/gpu/drm/mgag200/mgag200_main.c
··· 322 322 323 323 tbo = &((*bo)->bo); 324 324 ttm_bo_unref(&tbo); 325 - if (tbo == NULL) 326 - *bo = NULL; 327 - 325 + *bo = NULL; 328 326 } 329 327 330 328 void mgag200_gem_free_object(struct drm_gem_object *obj)