Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1309922imn; Sun, 31 Jul 2022 01:44:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tjeQoE0+YzsokTlr3mddk1KjtBdMZjF0BkdpLNfvchQ5+1U42KNBH7T0K0/JPo7/+ym54M X-Received: by 2002:a65:604f:0:b0:41b:558b:4be with SMTP id a15-20020a65604f000000b0041b558b04bemr9410821pgp.597.1659257063292; Sun, 31 Jul 2022 01:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659257063; cv=none; d=google.com; s=arc-20160816; b=voBnSKb9gxE7luQyBQcrry55aCyyqXm6Hz8aUww/T64aN444GE0U9xLVU8pJlO+ocE 7QY5xbMuzOP+7yhe/OfWQWT3Bg/iM7ZdLqUrOcPlZM3T7NASoYbOpijRW1p7XB51fJXY 8rdiQszAqq3Y4zV36FRR2h5E96aO+QlV6ejW6qOooh4EUWkZuizmVhZN4LWQEtlv80xx FAPNlaAKGiUGE6xiawXU0mQVgjhNRNskHZAr5HPZJmrrMoVh+tWqZZy1+2ZpKvhLvImP X9aelC+bzh93jAadz725arFBLVygHvEH+PMJfaA4qd9RAV39237WNHvGXxNDv2CsxOKY 4E8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OYCh3KJcwJ4TRfrH1vRqqBbHei0a6NcB0XvfKBcSF5A=; b=TWJ3CxFSEgmAZj2wz67obP0oI8gcNht6evn6wiCsoGyydu8/Hva4ukErs18x2cenZJ km8azPukbbdC5Gft3SQXIxdv/6DyFJwsN6o8uGsCpi07ATSjAtXdDE6NbfCSrV040vEl 5Kbupf0oS8T0yMPOCkP9ps4sHuiJhPiE3FhCVQDeFVZqNk2EEWZ8qyls0SJ/gbtOFXV/ nqFbvFzVbIf9oLvNJgAxm9aDwYyZ2mw9qY+WKk6AQYZdRWWccxjJvr4NumdRUPm62rQf WS4gyNxFnWLW7mDnmuxGSbnYQ/t8+TZP04jH8CWLcLUFY1+YcUnowtFfqwD5O3SctGuJ IYOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ooJLrlUl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a631642000000b0041a8f885c57si8618408pgw.214.2022.07.31.01.44.08; Sun, 31 Jul 2022 01:44:23 -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=pass header.i=@kernel.org header.s=k20201202 header.b=ooJLrlUl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234723AbiGaIeX (ORCPT + 99 others); Sun, 31 Jul 2022 04:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiGaIeW (ORCPT ); Sun, 31 Jul 2022 04:34:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F74112627; Sun, 31 Jul 2022 01:34:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E800A609D0; Sun, 31 Jul 2022 08:34:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D85C2C433C1; Sun, 31 Jul 2022 08:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659256460; bh=8QXXfpkC/0m1rjKafHxPZkNrxMHSchHUGWSCxb7xruc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ooJLrlUlRPs3IpHjOPsggXTx/yuzdvtF5RthB1kTeMfdG6tIf1W7ijcO/cCSssv6V Ge8ra+XpiNlVZJKVQg4bXk3H8DocDmA8ryEgL+qqnaD1/atwt6/0qJPwkbbqewui6C yesuzSYeZ4evOiBk1hCl01ZL+sy2bw1455OMKl03qphswFXFXODXiEZQpisc1oCXg/ TQ1ZUe8JVK1IGhNWzfgmpqM/By2lvynyOARyRaaig9Zk+VXHj7SeTkbb37Ac47Ab1F L4CnfqH0lZitlDTTB+6fWUcqsr7jqWek/uHs1yppBkjIBachPPVF8wldf82PFDBR/K 7M4wvBKv9IH4Q== Date: Sun, 31 Jul 2022 11:34:16 +0300 From: Leon Romanovsky To: Sebin Sebastian Cc: Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] RDMA/mlx5: unchecked return value Message-ID: References: <20220730103242.48612-1-mailmesebin00@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220730103242.48612-1-mailmesebin00@gmail.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 30, 2022 at 04:02:42PM +0530, Sebin Sebastian wrote: > 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(-) Thanks, I had similar patch in my internal queue. https://lore.kernel.org/linux-rdma/7b9ceda217d9368a51dc47a46b769bad4af9ac92.1659256069.git.leonro@nvidia.com/T/#u > > 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 >