lkml.org 
[lkml]   [2016]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next] nvme-rdma: fix the return value of nvme_rdma_reinit_request()
From
Date
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;
> }

\
 
 \ /
  Last update: 2016-07-12 16:41    [W:0.040 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site