Re: [PATCH] IB/hns: checking for IS_ERR() instead of NULL

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

 



On Fri, 2017-08-04 at 11:12 +0300, Dan Carpenter wrote:
> The hns_roce_v1_create_lp_qp() returns NULL on error, not error
> pointers.
> 
> Fixes: bfcc681bd09d ("IB/hns: Fix the bug when free mr")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> index 38f5c77baabf..747efd1ae5a6 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> @@ -733,7 +733,7 @@ static int hns_roce_v1_rsv_lp_qp(struct
> hns_roce_dev *hr_dev)
>  			continue;
>  
>  		free_mr->mr_free_qp[i] =
> hns_roce_v1_create_lp_qp(hr_dev, pd);
> -		if (IS_ERR(free_mr->mr_free_qp[i])) {
> +		if (!free_mr->mr_free_qp[i]) {
>  			dev_err(dev, "Create loop qp failed!\n");
>  			goto create_lp_qp_failed;
>  		}

Thanks, applied.

-- 
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 kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux