gfx: drv: fix resource leak in psb_gtt_map_meminfo
If psb_gtt_map_meminfo was called with an already mapped handle a node
would be allocated with drm_mm_get_block_atomic in psb_gtt_mm_alloc_mem.
Later, on psb_gtt_mm_alloc_insert_mem_mapping (called by
psb_gtt_add_node), the reference to the allocated node would be
replaced by the node previously allocated for the handle, so the former
was never free'd.
This commit changes psb_gtt_map_meminfo to check for an existing node
before allocating a new one.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>