瀏覽代碼

dmaengine: bcm-scm-raid: remove redundant null check on req

Req is never null on at the point of the null check, so
remove this redundant check and just return &req->tx.

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Colin Ian King 8 年之前
父節點
當前提交
1fc63cb4f1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/dma/bcm-sba-raid.c

+ 1 - 1
drivers/dma/bcm-sba-raid.c

@@ -582,7 +582,7 @@ sba_prep_dma_interrupt(struct dma_chan *dchan, unsigned long flags)
 	req->tx.flags = flags;
 	req->tx.cookie = -EBUSY;
 
-	return (req) ? &req->tx : NULL;
+	return &req->tx;
 }
 
 static void sba_fillup_memcpy_msg(struct sba_request *req,