Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp813837imn; Sat, 30 Jul 2022 04:15:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uKyJzgLPAFLomrPmmPpL+tQMWa7AOJ3/D4uDR9qFViseG6JBjzpN+iRCBfVd9btdYBjkUG X-Received: by 2002:a05:6402:4511:b0:43b:a182:8a0a with SMTP id ez17-20020a056402451100b0043ba1828a0amr7531149edb.410.1659179756963; Sat, 30 Jul 2022 04:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659179756; cv=none; d=google.com; s=arc-20160816; b=SGmQoUHfNDA5OhEt9n+pdRUc4HeBEp/drhvR8ad7jrE2RQ3pXP6eoV05ay4whG1hRy VW77vsEAV49BtC2SSvRkZZS6v7/DMe2Zwcm9Sr2qEIpJoJXcfTZJvNRgy4/V7oVbxkL0 VJw3JMUCYwW0DzByfZxQHDNU/oXyTduUu3kNSm1JZRqxlAVECazuTajKOzfJKAAHQr9+ JQFWvI2i0xUhzu8dWdKEQpXbyRl5YNwqZZ3y2IU8vbx0bCWVE1DlTMpCkygvQyJciP62 1d7Ms0AoxU47g5CkTQEn/b3Rc/tLzfK+nGWL8nW/lO3knyUi1I7pmByX7bumHorRPHs6 dCOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=Hy0u2dmUd0JC0VbYDqshLv8EWrBK/GXf+nBCSLK25WI=; b=pflGBprICgUBcjkoMOv5DEpVzxSrMoKa0lnwdb1K3SUdLWCkApQ0I/3ou2sJ/gXYvZ TtEyN+zE5MQak9YzMa5kGfmTiVtVUuQ8HlMBMMNPR/Qtk+/7xJ3vxvKUCGZ7f8B77y4+ 3RGh4smvQ+jyfc8rruIJkcq6t9kSqsPUSCs7YyXdn6MZRVzopFIOwXuESi6wHYYohOeS d13NJnpRvd7Qp5EUBPAG1c2yYUR5k4uXWsMhSHoF2Ur/h8kign1boBMPGExsshQnkisu f4RbzD/8pyuSnZq3s0UTULR7XpnJmdw5mZIdNZkm9n9KJADkQc387AGMdgk5yIfsnj44 A6fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=DZfqlTGV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090699c300b0072b81296609si5786691ejn.64.2022.07.30.04.15.24; Sat, 30 Jul 2022 04:15:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=DZfqlTGV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232440AbiG3Kc5 (ORCPT + 99 others); Sat, 30 Jul 2022 06:32:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbiG3Kc4 (ORCPT ); Sat, 30 Jul 2022 06:32:56 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D69AA64ED; Sat, 30 Jul 2022 03:32:55 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id o5-20020a17090a3d4500b001ef76490983so7423483pjf.2; Sat, 30 Jul 2022 03:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=Hy0u2dmUd0JC0VbYDqshLv8EWrBK/GXf+nBCSLK25WI=; b=DZfqlTGVuJ+7cwcyFeDEx1LrKuUHfc6OhJ6Rb/EvBBJyVBHSVk2OMWbJ7Avuep+4VK HaY1YfJncVDs8b9Oit+0eBpr/EoXkmcKiewkQDTLz0HjexGa2ntrlLJAJAAb/hvLElk6 TYuwuU9lj7ingA/rnAAAlyYD0qVU+9S7mKNHAxxZKFRVzRqYJxUkoAWqassR9zcp3A23 mV6PnBGi/EG6IClz+ZVPjE5N48XTEhcZdQGV2DQ2njtDA8TtH+Xl0Lac8FdUCp4QNh3n fIJtsKmD9DClTfYudys3ojA0/7M1xBJz3IikGcRThtj1pwvNywpJHO0wrazUqpD2aGIf O+Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=Hy0u2dmUd0JC0VbYDqshLv8EWrBK/GXf+nBCSLK25WI=; b=KzulLaLefRsSmfpSJ7ALRMUv3Ml5sb6JvorGhE+Oz9+betd4Blyx78QxMmWDZ5x+60 iI3sFp/L3bAME1ueqveCglUuvGLHB9u/9QW9ve/+9aBXVdEX1ebFx5vYo9rh4MEj/gjf 6p7Bn5ut3a2HhFvEWtaE9tjduRMvQBBm4em62t2OhAzhj4JTm5Lu7FHYJNQEmuA+Mt7f M3yAcopEuxvG4I9bdP7G1fczb1Q9E9RSay0pvLUQVySpXofpnwVJOg3sNr33xyLqqi7j XvijCdVZTVkTbQa0mzNwfUAljAUB58zQVkO8NqMah6/wrRQs0lEIzHvgZTR3EklMzUkP 4PUg== X-Gm-Message-State: ACgBeo3ZCM7yt5RzuSKvmFYGQv9+BPAgD65JeRs6BGf+ngTGHEd+sI0Q CRRp6SKUG4WoK+8BOdUFPug= X-Received: by 2002:a17:90a:5d05:b0:1ef:91ab:de15 with SMTP id s5-20020a17090a5d0500b001ef91abde15mr8414773pji.85.1659177175310; Sat, 30 Jul 2022 03:32:55 -0700 (PDT) Received: from localhost.localdomain ([103.160.194.175]) by smtp.gmail.com with ESMTPSA id p185-20020a6229c2000000b005251f4596f0sm4494462pfp.107.2022.07.30.03.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 03:32:54 -0700 (PDT) From: Sebin Sebastian Cc: mailmesebin00@gmail.com, Leon Romanovsky , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH -next] RDMA/mlx5: unchecked return value Date: Sat, 30 Jul 2022 16:02:42 +0530 Message-Id: <20220730103242.48612-1-mailmesebin00@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Unchecked return value warning as reported by Coverity static analyzer tool. check the return value of mlx5_ib_ft_type_to_namespace(). Signed-off-by: Sebin Sebastian --- drivers/infiniband/hw/mlx5/fs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c index 691d00c89f33..617e0e9c0c8e 100644 --- a/drivers/infiniband/hw/mlx5/fs.c +++ b/drivers/infiniband/hw/mlx5/fs.c @@ -2079,9 +2079,12 @@ static int mlx5_ib_matcher_ns(struct uverbs_attr_bundle *attrs, return err; if (flags) { - mlx5_ib_ft_type_to_namespace( + err = mlx5_ib_ft_type_to_namespace( MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX, &obj->ns_type); + if (err) + return err; + return 0; } } -- 2.34.1