Re: [PATCH] RDMA/irdma: Fix missing error code in irdma_modify_qp_roce()

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

 



On Fri, Jul 23, 2021 at 06:32:53PM +0800, Jiapeng Chong wrote:
> From: chongjiapeng <jiapeng.chong@xxxxxxxxxxxxxxxxx>
> 
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'ret'.
> 
> Eliminate the follow smatch warning:
> 
> drivers/infiniband/hw/irdma/verbs.c:1344 irdma_modify_qp_roce() warn:
> missing error code 'ret'.
> 
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
> Signed-off-by: chongjiapeng <jiapeng.chong@xxxxxxxxxxxxxxxxx>
> ---
>  drivers/infiniband/hw/irdma/verbs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
> index 717147e..406c8b05 100644
> --- a/drivers/infiniband/hw/irdma/verbs.c
> +++ b/drivers/infiniband/hw/irdma/verbs.c
> @@ -1341,6 +1341,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
>  			break;
>  		case IB_QPS_SQD:
>  			if (iwqp->iwarp_state == IRDMA_QP_STATE_SQD)
> +				ret = -EINVAL;
>  				goto exit;

You are missing brackets, it can't compile.

>  
>  			if (iwqp->iwarp_state != IRDMA_QP_STATE_RTS) {
> -- 
> 1.8.3.1
> 



[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