@@ -452,8 +452,6 @@ static int mvpp2_dbgfs_flow_port_init(struct dentry *parent,
452
452
struct dentry * port_dir ;
453
453
454
454
port_dir = debugfs_create_dir (port -> dev -> name , parent );
455
- if (IS_ERR (port_dir ))
456
- return PTR_ERR (port_dir );
457
455
458
456
port_entry = & port -> priv -> dbgfs_entries -> port_flow_entries [port -> id ];
459
457
@@ -480,8 +478,6 @@ static int mvpp2_dbgfs_flow_entry_init(struct dentry *parent,
480
478
sprintf (flow_entry_name , "%02d" , flow );
481
479
482
480
flow_entry_dir = debugfs_create_dir (flow_entry_name , parent );
483
- if (!flow_entry_dir )
484
- return - ENOMEM ;
485
481
486
482
entry = & priv -> dbgfs_entries -> flow_entries [flow ];
487
483
@@ -514,8 +510,6 @@ static int mvpp2_dbgfs_flow_init(struct dentry *parent, struct mvpp2 *priv)
514
510
int i , ret ;
515
511
516
512
flow_dir = debugfs_create_dir ("flows" , parent );
517
- if (!flow_dir )
518
- return - ENOMEM ;
519
513
520
514
for (i = 0 ; i < MVPP2_N_PRS_FLOWS ; i ++ ) {
521
515
ret = mvpp2_dbgfs_flow_entry_init (flow_dir , priv , i );
@@ -539,8 +533,6 @@ static int mvpp2_dbgfs_prs_entry_init(struct dentry *parent,
539
533
sprintf (prs_entry_name , "%03d" , tid );
540
534
541
535
prs_entry_dir = debugfs_create_dir (prs_entry_name , parent );
542
- if (!prs_entry_dir )
543
- return - ENOMEM ;
544
536
545
537
entry = & priv -> dbgfs_entries -> prs_entries [tid ];
546
538
@@ -578,8 +570,6 @@ static int mvpp2_dbgfs_prs_init(struct dentry *parent, struct mvpp2 *priv)
578
570
int i , ret ;
579
571
580
572
prs_dir = debugfs_create_dir ("parser" , parent );
581
- if (!prs_dir )
582
- return - ENOMEM ;
583
573
584
574
for (i = 0 ; i < MVPP2_PRS_TCAM_SRAM_SIZE ; i ++ ) {
585
575
ret = mvpp2_dbgfs_prs_entry_init (prs_dir , priv , i );
@@ -688,8 +678,6 @@ static int mvpp2_dbgfs_port_init(struct dentry *parent,
688
678
struct dentry * port_dir ;
689
679
690
680
port_dir = debugfs_create_dir (port -> dev -> name , parent );
691
- if (IS_ERR (port_dir ))
692
- return PTR_ERR (port_dir );
693
681
694
682
debugfs_create_file ("parser_entries" , 0444 , port_dir , port ,
695
683
& mvpp2_dbgfs_port_parser_fops );
@@ -716,15 +704,10 @@ void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name)
716
704
int ret , i ;
717
705
718
706
mvpp2_root = debugfs_lookup (MVPP2_DRIVER_NAME , NULL );
719
- if (!mvpp2_root ) {
707
+ if (!mvpp2_root )
720
708
mvpp2_root = debugfs_create_dir (MVPP2_DRIVER_NAME , NULL );
721
- if (IS_ERR (mvpp2_root ))
722
- return ;
723
- }
724
709
725
710
mvpp2_dir = debugfs_create_dir (name , mvpp2_root );
726
- if (IS_ERR (mvpp2_dir ))
727
- return ;
728
711
729
712
priv -> dbgfs_dir = mvpp2_dir ;
730
713
priv -> dbgfs_entries = kzalloc (sizeof (* priv -> dbgfs_entries ), GFP_KERNEL );
0 commit comments