Re: [PATCH mlx5-next v1 1/4] {IB/net}/mlx5: Simplify don't trap code

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

 



On Mon, May 04, 2020 at 08:30:09AM +0300, Leon Romanovsky wrote:
> +	flow_act->action &=
> +		~MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO;
> +	flow_act->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
> +	handle = _mlx5_add_flow_rules(ft, spec, flow_act, dest, num_dest);
> +	if (IS_ERR_OR_NULL(handle))
> +		goto unlock;

I never like seeing IS_ERR_OR_NULL()..

In this case I see callers of mlx5_add_flow_rules() that crash if it
returns NULL, so this can't be right.

Also, I don't see an obvious place where _mlx5_add_flow_rules()
returns NULL, does it?

Jason



[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