Skip to content

Commit

Permalink
ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq()
Browse files Browse the repository at this point in the history
Since the debugfs_create_dir() never returns a null pointer, checking
the return value for a null pointer is redundant, and using IS_ERR is
safe enough.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://patch.msgid.link/20240903143149.2004530-1-lizetao1@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Li Zetao authored and Jakub Kicinski committed Sep 4, 2024
1 parent 2a7e41b commit 4614ac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void ionic_debugfs_add_qcq(struct ionic_lif *lif, struct ionic_qcq *qcq)
struct ionic_cq *cq = &qcq->cq;

qcq_dentry = debugfs_create_dir(q->name, lif->dentry);
if (IS_ERR_OR_NULL(qcq_dentry))
if (IS_ERR(qcq_dentry))
return;
qcq->dentry = qcq_dentry;

Expand Down

0 comments on commit 4614ac2

Please sign in to comment.