* [PATCH -next] RDMA/mlx5: unchecked return value
@ 2022-07-30 10:32 Sebin Sebastian
2022-07-31 8:34 ` Leon Romanovsky
2022-08-02 16:57 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Sebin Sebastian @ 2022-07-30 10:32 UTC (permalink / raw)
Cc: mailmesebin00, Leon Romanovsky, Jason Gunthorpe, linux-rdma,
linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] RDMA/mlx5: unchecked return value
2022-07-30 10:32 [PATCH -next] RDMA/mlx5: unchecked return value Sebin Sebastian
@ 2022-07-31 8:34 ` Leon Romanovsky
2022-08-02 16:57 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2022-07-31 8:34 UTC (permalink / raw)
To: Sebin Sebastian; +Cc: Jason Gunthorpe, linux-rdma, linux-kernel
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 <mailmesebin00@gmail.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] RDMA/mlx5: unchecked return value
2022-07-30 10:32 [PATCH -next] RDMA/mlx5: unchecked return value Sebin Sebastian
2022-07-31 8:34 ` Leon Romanovsky
@ 2022-08-02 16:57 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-08-02 16:57 UTC (permalink / raw)
To: Sebin Sebastian; +Cc: Leon Romanovsky, linux-rdma, linux-kernel
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 <mailmesebin00@gmail.com>
> ---
> drivers/infiniband/hw/mlx5/fs.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Leon's is cleaner and has a proper fixes line, so I will use his
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-02 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-30 10:32 [PATCH -next] RDMA/mlx5: unchecked return value Sebin Sebastian
2022-07-31 8:34 ` Leon Romanovsky
2022-08-02 16:57 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.