瀏覽代碼

Fix dead assignment.

[scan-build] Dead assignment.
Cyril Roelandt 13 年之前
父節點
當前提交
f44b57b8b1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/drivers/cuda/driver_cuda.c

+ 2 - 0
src/drivers/cuda/driver_cuda.c

@@ -214,6 +214,8 @@ static int execute_job_on_cuda(starpu_job_t j, struct starpu_worker_s *args)
 #ifdef HAVE_CUDA_MEMCPY_PEER
 	/* We make sure we do manipulate the proper device */
 	cures = cudaSetDevice(args->devid);
+	if (STARPU_UNLIKELY(cures != cudaSuccess))
+		STARPU_CUDA_REPORT_ERROR(cures);
 #endif
 
 	if (cl->cuda_func != STARPU_MULTIPLE_CUDA_IMPLEMENTATIONS) {