drm/prime: fix to check return of dma_map_sg in prime helper
authorYoungJun Cho <yj44.cho@samsung.com>
Mon, 24 Jun 2013 06:34:21 +0000 (15:34 +0900)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Jun 2013 02:45:11 +0000 (12:45 +1000)
commitb720d54a5caf077011f0dc6ba7792866d2828d16
tree9ffabea64b3267066097b5713611c96b074704c7
parent2e07fb229396f99fc173d8612f0f83ea9de0341b
drm/prime: fix to check return of dma_map_sg in prime helper

The dma_map_sg(), in map_dma_buf callback operation of prime helper,
can return 0 when it fails to map, so it needs to release related
resources.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_prime.c