From: Christophe JAILLET Date: Sun, 30 Oct 2016 15:38:42 +0000 (+0100) Subject: drm/armada: remove some dead code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=244a2419b6c6dc8a4d301d565fbb0b9ad93d035c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/armada: remove some dead code 'dma_buf_map_attachment()' can not return NULL, so there is no need to check for it. Also add a space in order to improve layout. Signed-off-by: Christophe JAILLET Signed-off-by: Russell King --- diff --git a/drivers/gpu/drm/armada/armada_gem.c b/drivers/gpu/drm/armada/armada_gem.c index b52ecfd9ca7a..fd92446f9cce 100644 --- a/drivers/gpu/drm/armada/armada_gem.c +++ b/drivers/gpu/drm/armada/armada_gem.c @@ -594,11 +594,7 @@ int armada_gem_map_import(struct armada_gem_object *dobj) int ret; dobj->sgt = dma_buf_map_attachment(dobj->obj.import_attach, - DMA_TO_DEVICE); - if (!dobj->sgt) { - DRM_ERROR("dma_buf_map_attachment() returned NULL\n"); - return -EINVAL; - } + DMA_TO_DEVICE); if (IS_ERR(dobj->sgt)) { ret = PTR_ERR(dobj->sgt); dobj->sgt = NULL;