misc: mic: scif: remove redundant check on ret < 0
authorColin Ian King <colin.king@canonical.com>
Sat, 6 Oct 2018 21:56:58 +0000 (22:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Oct 2018 10:12:55 +0000 (12:12 +0200)
The check for ret < 0 is redundant as any places prior to this point
where ret is set to an error value the code will exit out of the loop
to the error exit label 'err'.  Remove this redundant dead code.

Detected by CoverityScan, CID#1339528 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/scif/scif_dma.c

index 03af8b5b7b0d769f76bb403e31270ed6121fad3a..2d76c200d0721a5e9e4fedf0c4c903a3d107e5c4 100644 (file)
@@ -1035,8 +1035,6 @@ scif_rma_list_dma_copy_unaligned(struct scif_copy_work *work,
                        }
                        dma_async_issue_pending(chan);
                }
-               if (ret < 0)
-                       goto err;
                offset += loop_len;
                temp += loop_len;
                temp_phys += loop_len;