drm/armada: remove some dead code
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 30 Oct 2016 15:38:42 +0000 (16:38 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 17 Nov 2016 00:02:50 +0000 (00:02 +0000)
'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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/armada/armada_gem.c

index b52ecfd9ca7a9edf70e9371eef8044bb3fba87dd..fd92446f9cce682964e50c45494fafe24f07555f 100644 (file)
@@ -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;