Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441390

Re: [PATCH -next] nvme-rdma: fix the return value of nvme_rdma_reinit_request()

From J Freyensee <james_p_freyensee@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH -next] nvme-rdma: fix the return value of nvme_rdma_reinit_request()
Date 2016-07-12 16:20 +0200
Message-ID <rU6Hv-62T-11@gated-at.bofh.it> (permalink)
References <rU3JD-44Q-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2016-07-12 at 11:06 +0000, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> PTR_ERR should be applied before its argument is reassigned,
> otherwise the
> return value will be set to 0, not error code.

Another good catch.

Reviewed-by: Jay Freyensee <james_p_freyensee@linux.intel.com>

> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

>  	if (IS_ERR(req->mr)) {
> -		req->mr = NULL;
>  		ret = PTR_ERR(req->mr);
> +		req->mr = NULL;
>  	}

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -next] nvme-rdma: fix the return value of nvme_rdma_reinit_request() weiyj_lk@163.com - 2016-07-12 13:10 +0200
  Re: [PATCH -next] nvme-rdma: fix the return value of  nvme_rdma_reinit_request() J Freyensee <james_p_freyensee@linux.intel.com> - 2016-07-12 16:20 +0200
  Re: [PATCH -next] nvme-rdma: fix the return value of  nvme_rdma_reinit_request() Sagi Grimberg <sagi@grimberg.me> - 2016-07-13 12:40 +0200

csiph-web