Re: [PATCH] IB/mlx4: Remove unneeded NULL check

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

 



On Tue, Dec 11, 2018 at 12:26:35PM +0200, Yuval Shaia wrote:
> NULL check for kfree is unnecessary, remove it.
>
> Fixes: b42dde47 ("IB/mlx4: Rework special QP creation error path")

It is wrong Fixes format
Fixes: b42dde478bca ....

> Signed-off-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx>
> ---
>  drivers/infiniband/hw/mlx4/qp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
> index fd95699cae35..651d8594dc3f 100644
> --- a/drivers/infiniband/hw/mlx4/qp.c
> +++ b/drivers/infiniband/hw/mlx4/qp.c
> @@ -1211,10 +1211,10 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
>  		mlx4_db_free(dev->dev, &qp->db);
>
>  err:
> -	if (sqp)
> -		kfree(sqp);
> -	else if (!*caller_qp)
> +	if (!sqp && !*caller_qp)
>  		kfree(qp);
> +	kfree(sqp);
> +

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[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