[PATCH -next] RDMA/mlx5: unchecked return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux