Re: [PATCH] RDMA/hns: Fix uninitialized variable in hns_roce_v2_query_qp()

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

 



On Tue, 2017-10-03 at 13:54 +0300, Dan Carpenter wrote:
> We accidentally return an uninitialized value if
> (hr_qp->state == IB_QPS_RESET).  We should be returning success.
> 
> Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08
> SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Hi Dan, I already took in another patch that solves the same issue. 
Thanks.

> 
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> index 4171f73bdad5..e1c59dc066c9 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> @@ -2792,7 +2792,7 @@ static int hns_roce_v2_query_qp(struct ib_qp
> *ibqp, struct ib_qp_attr *qp_attr,
>  	struct device *dev = hr_dev->dev;
>  	int tmp_qp_state;
>  	int state;
> -	int ret;
> +	int ret = 0;
>  
>  	context = kzalloc(sizeof(*context), GFP_KERNEL);
>  	if (!context)
-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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