Commit 1e985a8d authored by Gal Pressman's avatar Gal Pressman Committed by Saeed Mahameed
Browse files

net/mlx5e: Remove incorrect debugfs_create_dir NULL check in TLS



Remove the NULL check on debugfs_create_dir() return value as the
function returns an ERR pointer on failure, not NULL.
The check is not replaced with a IS_ERR_OR_NULL() as
debugfs_create_file(), and debugfs functions in general don't need error
checking.

Fixes: 0fedee1a ("net/mlx5e: kTLS, Add debugfs")
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGal Pressman <gal@nvidia.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent afae6254
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -899,8 +899,6 @@ static void mlx5e_tls_tx_debugfs_init(struct mlx5e_tls *tls,
		return;

	tls->debugfs.dfs_tx = debugfs_create_dir("tx", dfs_root);
	if (!tls->debugfs.dfs_tx)
		return;

	debugfs_create_size_t("pool_size", 0400, tls->debugfs.dfs_tx,
			      &tls->tx_pool->size);