From: Gal Pressman Date: Thu, 19 Jan 2023 12:09:00 +0000 (+0200) Subject: net/mlx5e: Remove incorrect debugfs_create_dir NULL check in TLS X-Git-Tag: v6.6.17~5509^2~112^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e985a8d887cd0b25541ba977db171be47cf575d;p=platform%2Fkernel%2Flinux-rpi.git 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: 0fedee1ae9ef ("net/mlx5e: kTLS, Add debugfs") Reported-by: Dan Carpenter Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c index e80b43b..60b3e08 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c @@ -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);