public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebin Sebastian <mailmesebin00@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: mailmesebin00@gmail.com, Leon Romanovsky <leon@kernel.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	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	[thread overview]
Message-ID: <20220730103242.48612-1-mailmesebin00@gmail.com> (raw)

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 <mailmesebin00@gmail.com>
---
 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


             reply	other threads:[~2022-07-30 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 10:32 Sebin Sebastian [this message]
2022-07-31  8:34 ` [PATCH -next] RDMA/mlx5: unchecked return value Leon Romanovsky
2022-08-02 16:57 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220730103242.48612-1-mailmesebin00@gmail.com \
    --to=mailmesebin00@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox