* [PATCH] IB/mlx4: Potential uninitialized variable in bringup_rss_rwqs()
@ 2017-08-01 10:57 Dan Carpenter
2017-08-01 11:19 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-08-01 10:57 UTC (permalink / raw)
To: Yishai Hadas, Guy Levi
Cc: Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma,
kernel-janitors
My static checker complains "err" can be used uninitialized. I don't
know the subsystem well, but to an outside observer it seems like a
potential bug.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index e42acfb20588..03896e3af67f 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -2035,7 +2035,7 @@ static u8 gid_type_to_qpc(enum ib_gid_type gid_type)
static int bringup_rss_rwqs(struct ib_rwq_ind_table *ind_tbl, u8 port_num)
{
int i;
- int err;
+ int err = 0;
for (i = 0; i < (1 << ind_tbl->log_ind_tbl_size); i++) {
struct ib_wq *ibwq = ind_tbl->ind_tbl[i];
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] IB/mlx4: Potential uninitialized variable in bringup_rss_rwqs()
2017-08-01 10:57 [PATCH] IB/mlx4: Potential uninitialized variable in bringup_rss_rwqs() Dan Carpenter
@ 2017-08-01 11:19 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2017-08-01 11:19 UTC (permalink / raw)
To: Dan Carpenter
Cc: Yishai Hadas, Guy Levi, Doug Ledford, Sean Hefty, Hal Rosenstock,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
On Tue, Aug 01, 2017 at 01:57:55PM +0300, Dan Carpenter wrote:
> My static checker complains "err" can be used uninitialized. I don't
> know the subsystem well, but to an outside observer it seems like a
> potential bug.
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
Thanks, Dan,
I made the same patch, but didn't submit it yet.
https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?h=rdma-next&id=2c714f9f58e2b6a27b941d7395f4f49a4d0e414b
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-01 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-01 10:57 [PATCH] IB/mlx4: Potential uninitialized variable in bringup_rss_rwqs() Dan Carpenter
2017-08-01 11:19 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox