Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1242861pxv; Fri, 23 Jul 2021 03:37:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYeZpXjfTvJXtZej0n90IM/fS5gN5nGPAGYem7eNMnkgZ6sarsaoBdeQ/pIkvC7pF6j9v9 X-Received: by 2002:a17:906:5e51:: with SMTP id b17mr4053750eju.270.1627036633353; Fri, 23 Jul 2021 03:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627036633; cv=none; d=google.com; s=arc-20160816; b=mhsVqfO9ya6wt65CZOshBMJyi4Lynq2uwrBP3isVEsl8rZuOlMOxbBYT4OUwGmJp0v ZOy6KcnTfTbcZOfjuA3trRUnwVcRG25xvolPlDsc40eWoTdqUhLP4qvpi8Ta70DRzbcl uJC5OQNQzSZytW3yr4STAnLk7hH0hLHZZFcCQdgu1YBVhrLKRhe56wWLuB0LbcPpe/4C R3bhjzOtZawdsdm3EWS9mZ+WdR+d3EaJbfg0bc6fIEvTW8Ww7IepUNPJUPQCyK7cAUet IZB6uCsZtuyEgdIfLq4+YGM/eix7SOF06N27BK3udpLHNGuJRQZZYUU42lFXdDf8PJRE HFwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=UFFP8uvMKPWVCqZ1VvLjZpaRS53ZnL4SAjzLKcht55Y=; b=EHiPIgi7oG+9ku3oqozbV/JOpuS62fh1mP87KurK8dW6jJG9R+o7LUOG3wPVeiRs/l ff5KHA7HBuueYQRhX3xfKhqlym0jbrhyS9X9lEzILfyYOPKcSDiPU/snjdJsA/S4d8nh ZrRF5/G9O/My6uJ1uZQ1cxLsHrVxMGqHT22UqK45IaRqy087FcsMRNeMcGvKH+n4hiuQ AqLQ5Yo/yxwHkuyTHYbuyFupLLpukIZsL5CSXq3z3HiM2qriH+fYR7AMwfialUK9Qhfx ihxeVEexfL2LPI5A/oBWOTSfFyjs4gNkXJmKzV46gHlf3teENhN0WrDKgiFXK6mv3b/g Zhwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qa18si4944844ejc.491.2021.07.23.03.36.49; Fri, 23 Jul 2021 03:37:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbhGWJwd (ORCPT + 99 others); Fri, 23 Jul 2021 05:52:33 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:54275 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbhGWJwd (ORCPT ); Fri, 23 Jul 2021 05:52:33 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Ugi2esO_1627036381; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Ugi2esO_1627036381) by smtp.aliyun-inc.com(127.0.0.1); Fri, 23 Jul 2021 18:33:05 +0800 From: Jiapeng Chong To: mustafa.ismail@intel.com Cc: shiraz.saleem@intel.com, dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, chongjiapeng Subject: [PATCH] RDMA/irdma: Fix missing error code in irdma_modify_qp_roce() Date: Fri, 23 Jul 2021 18:32:53 +0800 Message-Id: <1627036373-69929-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: chongjiapeng The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. Eliminate the follow smatch warning: drivers/infiniband/hw/irdma/verbs.c:1344 irdma_modify_qp_roce() warn: missing error code 'ret'. Reported-by: Abaci Robot Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: chongjiapeng --- drivers/infiniband/hw/irdma/verbs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 717147e..406c8b05 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -1341,6 +1341,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr, break; case IB_QPS_SQD: if (iwqp->iwarp_state == IRDMA_QP_STATE_SQD) + ret = -EINVAL; goto exit; if (iwqp->iwarp_state != IRDMA_QP_STATE_RTS) { -- 1.8.3.1