Skip to content

Commit f8e3433

Browse files
Minjie Dukuba-moo
authored andcommitted
net: mvpp2: debugfs: remove redundant parameter check in three functions
As per the comment above debugfs_create_dir(), it is not expected to return an error, so an extra error check is not needed. Drop the return check of debugfs_create_dir() in mvpp2_dbgfs_c2_entry_init(), mvpp2_dbgfs_flow_tbl_entry_init() and mvpp2_dbgfs_cls_init(). Signed-off-by: Minjie Du <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9843814 commit f8e3433

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,6 @@ static int mvpp2_dbgfs_c2_entry_init(struct dentry *parent,
593593
sprintf(c2_entry_name, "%03d", id);
594594

595595
c2_entry_dir = debugfs_create_dir(c2_entry_name, parent);
596-
if (!c2_entry_dir)
597-
return -ENOMEM;
598596

599597
entry = &priv->dbgfs_entries->c2_entries[id];
600598

@@ -626,8 +624,6 @@ static int mvpp2_dbgfs_flow_tbl_entry_init(struct dentry *parent,
626624
sprintf(flow_tbl_entry_name, "%03d", id);
627625

628626
flow_tbl_entry_dir = debugfs_create_dir(flow_tbl_entry_name, parent);
629-
if (!flow_tbl_entry_dir)
630-
return -ENOMEM;
631627

632628
entry = &priv->dbgfs_entries->flt_entries[id];
633629

@@ -646,12 +642,8 @@ static int mvpp2_dbgfs_cls_init(struct dentry *parent, struct mvpp2 *priv)
646642
int i, ret;
647643

648644
cls_dir = debugfs_create_dir("classifier", parent);
649-
if (!cls_dir)
650-
return -ENOMEM;
651645

652646
c2_dir = debugfs_create_dir("c2", cls_dir);
653-
if (!c2_dir)
654-
return -ENOMEM;
655647

656648
for (i = 0; i < MVPP22_CLS_C2_N_ENTRIES; i++) {
657649
ret = mvpp2_dbgfs_c2_entry_init(c2_dir, priv, i);
@@ -660,8 +652,6 @@ static int mvpp2_dbgfs_cls_init(struct dentry *parent, struct mvpp2 *priv)
660652
}
661653

662654
flow_tbl_dir = debugfs_create_dir("flow_table", cls_dir);
663-
if (!flow_tbl_dir)
664-
return -ENOMEM;
665655

666656
for (i = 0; i < MVPP2_CLS_FLOWS_TBL_SIZE; i++) {
667657
ret = mvpp2_dbgfs_flow_tbl_entry_init(flow_tbl_dir, priv, i);

0 commit comments

Comments
 (0)