Message ID | 20170801105755.vy4tqnmvtdtrbbo5@mwanda (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
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@oracle.com> > 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@mellanox.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];
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> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html