Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp736740imm; Thu, 13 Sep 2018 07:02:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYHZgaaujx8kVcLvuv6HYHDjzszAjt3gpg3eC2/D+W3YKXVRsWqqyZ1K63v89nMCobo07hy X-Received: by 2002:a63:1e63:: with SMTP id p35-v6mr7387776pgm.376.1536847379350; Thu, 13 Sep 2018 07:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847379; cv=none; d=google.com; s=arc-20160816; b=uIPNKuvKT35PiwMRnhQrG6OPMHJMuCgK0d+KQG5SA3dtIot2RA9Eljy3CjAM8MD3KV 3ORUVqrJI+rVTBH6EC7b5WzfCpuU4Tnp3g1+8myijnNvI87nFVl9deAQCtWUvIXc7MHs 1H9IWIqfH+rG49iIDi6L3B04w8TLp4ayCdiUERM1N0HyZjjSVh8soO6izNbxBqp5JqzC rgdCa2EYr3vLVjSxDFiua8kS9z2LHdYjF/qsWD/0/QfomeRm+J5z8ZB7N8kNVIvZs/Jm xqgUf+A6MY9/PSY/xtrEwK93EF2E8b93dmUGXYHndFO3sONypgiAIPSk4Z22VVVuzbpU ki+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=1jHqC+emwe2bFByXoY4L28J4xge/zh8B0oEMJ1pvQ3Q=; b=La93asScfmwW+C2h+KOeMJSq0YoN7GWqSQecnXxio/CG89/Hh30cb0Y3fsNT4yr149 qniue2+5Im+zD1+HuGD1+L++oJV54ouu277TMPGehE7AN5C7zD2ENBcaZe5FigOtYsmJ 7D7it0I+eNzsPv7NNmCU+RatU2m5hQUqa3cxgnh1xPpvxGrWQox1IVkXxl26I3rpNv+M EPGCiI/Ie2mNe3GYQgIQof+2Cj7VztT3rrrmrgrvYzCeO4cC8rdS+Magzv/k2llE5k+g j53BPNcLR4wjNPFm1+6e6MbtcaftSPHSgvkWeGWG9ZYzCTgsBo1Mboe0fKJ2L9Omlhti ZZfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78-v6si4093595pfm.264.2018.09.13.07.02.36; Thu, 13 Sep 2018 07:02:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731963AbeIMTMF (ORCPT + 99 others); Thu, 13 Sep 2018 15:12:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35222 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731249AbeIMTME (ORCPT ); Thu, 13 Sep 2018 15:12:04 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6F8D8D2E; Thu, 13 Sep 2018 14:02:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Santosh Shilimkar , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 118/197] RDS: IB: fix passing zero to ERR_PTR() warning Date: Thu, 13 Sep 2018 15:31:07 +0200 Message-Id: <20180913131846.270683851@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: YueHaibing [ Upstream commit 5941923da29e84bc9e2a1abb2c14fffaf8d71e2f ] Fix a static code checker warning: net/rds/ib_frmr.c:82 rds_ib_alloc_frmr() warn: passing zero to 'ERR_PTR' The error path for ib_alloc_mr failure should set err to PTR_ERR. Fixes: 1659185fb4d0 ("RDS: IB: Support Fastreg MR (FRMR) memory registration mode") Signed-off-by: YueHaibing Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/rds/ib_frmr.c | 1 + 1 file changed, 1 insertion(+) --- a/net/rds/ib_frmr.c +++ b/net/rds/ib_frmr.c @@ -61,6 +61,7 @@ static struct rds_ib_mr *rds_ib_alloc_fr pool->fmr_attr.max_pages); if (IS_ERR(frmr->mr)) { pr_warn("RDS/IB: %s failed to allocate MR", __func__); + err = PTR_ERR(frmr->mr); goto out_no_cigar; }