@@ -411,7 +411,7 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f)
411411
412412 entry -> cookie = f -> cookie ;
413413 timestamp = mtk_eth_timestamp (eth );
414- hash = mtk_foe_entry_commit (& eth -> ppe , & foe , timestamp );
414+ hash = mtk_foe_entry_commit (eth -> ppe , & foe , timestamp );
415415 if (hash < 0 ) {
416416 err = hash ;
417417 goto free ;
@@ -426,7 +426,7 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f)
426426
427427 return 0 ;
428428clear_flow :
429- mtk_foe_entry_clear (& eth -> ppe , hash );
429+ mtk_foe_entry_clear (eth -> ppe , hash );
430430free :
431431 kfree (entry );
432432 if (wed_index >= 0 )
@@ -444,7 +444,7 @@ mtk_flow_offload_destroy(struct mtk_eth *eth, struct flow_cls_offload *f)
444444 if (!entry )
445445 return - ENOENT ;
446446
447- mtk_foe_entry_clear (& eth -> ppe , entry -> hash );
447+ mtk_foe_entry_clear (eth -> ppe , entry -> hash );
448448 rhashtable_remove_fast (& eth -> flow_table , & entry -> node ,
449449 mtk_flow_ht_params );
450450 if (entry -> wed_index >= 0 )
@@ -466,7 +466,7 @@ mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
466466 if (!entry )
467467 return - ENOENT ;
468468
469- timestamp = mtk_foe_entry_timestamp (& eth -> ppe , entry -> hash );
469+ timestamp = mtk_foe_entry_timestamp (eth -> ppe , entry -> hash );
470470 if (timestamp < 0 )
471471 return - ETIMEDOUT ;
472472
@@ -522,7 +522,7 @@ mtk_eth_setup_tc_block(struct net_device *dev, struct flow_block_offload *f)
522522 struct flow_block_cb * block_cb ;
523523 flow_setup_cb_t * cb ;
524524
525- if (!eth -> ppe . foe_table )
525+ if (!eth -> ppe || ! eth -> ppe -> foe_table )
526526 return - EOPNOTSUPP ;
527527
528528 if (f -> binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS )
@@ -574,7 +574,7 @@ int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
574574
575575int mtk_eth_offload_init (struct mtk_eth * eth )
576576{
577- if (!eth -> ppe . foe_table )
577+ if (!eth -> ppe || ! eth -> ppe -> foe_table )
578578 return 0 ;
579579
580580 return rhashtable_init (& eth -> flow_table , & mtk_flow_ht_params );
0 commit comments