lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e98867d3-0672-1f0a-b45e-3ba7bd44d9b5@mellanox.com>
Date:   Tue, 3 Oct 2017 13:58:18 +0300
From:   Yotam Gigi <yotamg@...lanox.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Jiri Pirko <jiri@...lanox.com>
Cc:     Ido Schimmel <idosch@...lanox.com>, netdev@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2 net-next] mlxsw: spectrum: Fix check for IS_ERR()
 instead of NULL

On 10/03/2017 01:53 PM, Dan Carpenter wrote:
> mlxsw_afa_block_create() doesn't return error pointers, it returns NULL
> on error.
>
> Fixes: 0e14c7777acb ("mlxsw: spectrum: Add the multicast routing hardware logic")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Acked-by: Yotam Gigi <yotamg@...lanox.com>

Thanks!

>
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c
> index cda9e9ad10e3..5e4ccbf17e3d 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c
> @@ -239,8 +239,8 @@ mlxsw_sp_mr_tcam_afa_block_create(struct mlxsw_sp *mlxsw_sp,
>  	int err;
>  
>  	afa_block = mlxsw_afa_block_create(mlxsw_sp->afa);
> -	if (IS_ERR(afa_block))
> -		return afa_block;
> +	if (!afa_block)
> +		return ERR_PTR(-ENOMEM);
>  
>  	err = mlxsw_afa_block_append_counter(afa_block, counter_index);
>  	if (err)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ