Message ID | 20190225183927.GA32253@lkp-wsm-ep1 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/lima: fix ifnullfree.cocci warnings | expand |
--- a/drivers/gpu/drm/lima/lima_object.c +++ b/drivers/gpu/drm/lima/lima_object.c @@ -10,8 +10,7 @@ void lima_bo_destroy(struct lima_bo *bo) { if (bo->sgt) { - if (bo->pages) - kfree(bo->pages); + kfree(bo->pages); drm_prime_gem_destroy(&bo->gem, bo->sgt); } @@ -31,8 +30,7 @@ void lima_bo_destroy(struct lima_bo *bo) drm_gem_put_pages(&bo->gem, bo->pages, true, true); } - if (bo->pages_dma_addr) - kfree(bo->pages_dma_addr); + kfree(bo->pages_dma_addr); drm_gem_object_release(&bo->gem); kfree(bo);