diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-23 05:35:55 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-23 05:35:55 -0400 |
| commit | 5804c19b80bf625c6a9925317f845e497434d6d3 (patch) | |
| tree | ba4a0bf9cac721e2bf898e3be5ab64773da5a9d2 /drivers/net/ethernet/broadcom/asp2/bcmasp.c | |
| parent | 916e3e5f26abc165437950daff370c0693572ef4 (diff) | |
| parent | 071ef070ca77e6dfe33fd78afa293e83422f0411 (diff) | |
| download | linux-5804c19b80bf625c6a9925317f845e497434d6d3.tar.gz linux-5804c19b80bf625c6a9925317f845e497434d6d3.tar.bz2 linux-5804c19b80bf625c6a9925317f845e497434d6d3.zip | |
Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv fixes for 6.6, take #1
- Fix KVM_GET_REG_LIST API for ISA_EXT registers
- Fix reading ISA_EXT register of a missing extension
- Fix ISA_EXT register handling in get-reg-list test
- Fix filtering of AIA registers in get-reg-list test
Diffstat (limited to 'drivers/net/ethernet/broadcom/asp2/bcmasp.c')
| -rw-r--r-- | drivers/net/ethernet/broadcom/asp2/bcmasp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c index d63d321f3e7b..41a6098eb0c2 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c @@ -528,13 +528,16 @@ void bcmasp_netfilt_suspend(struct bcmasp_intf *intf) ASP_RX_FILTER_BLK_CTRL); } -void bcmasp_netfilt_get_all_active(struct bcmasp_intf *intf, u32 *rule_locs, - u32 *rule_cnt) +int bcmasp_netfilt_get_all_active(struct bcmasp_intf *intf, u32 *rule_locs, + u32 *rule_cnt) { struct bcmasp_priv *priv = intf->parent; int j = 0, i; for (i = 0; i < NUM_NET_FILTERS; i++) { + if (j == *rule_cnt) + return -EMSGSIZE; + if (!priv->net_filters[i].claimed || priv->net_filters[i].port != intf->port) continue; @@ -548,6 +551,8 @@ void bcmasp_netfilt_get_all_active(struct bcmasp_intf *intf, u32 *rule_locs, } *rule_cnt = j; + + return 0; } int bcmasp_netfilt_get_active(struct bcmasp_intf *intf) @@ -1300,6 +1305,7 @@ static int bcmasp_probe(struct platform_device *pdev) if (!intf) { dev_err(dev, "Cannot create eth interface %d\n", i); bcmasp_remove_intfs(priv); + of_node_put(intf_node); goto of_put_exit; } list_add_tail(&intf->list, &priv->intfs); |
