summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-04-07 11:14:42 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-04-08 13:11:29 +0200
commit4acdd3de31c878804c6be826cb8c508f18962d0e (patch)
tree4f45c61ff5b2a9349ba53aafe561582e1d5cefef
parentfc2e4f4f7b5f24327113297e624f13f2847cc6ea (diff)
rocker: Simplify if condition in ofdpa_port_fdb()
Remove the double negation and simplify the if condition. No functional changes intended. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20250407091442.743478-1-thorsten.blum@linux.dev Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--drivers/net/ethernet/rocker/rocker_ofdpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c
index 826990459fa4..8832bfdd8833 100644
--- a/drivers/net/ethernet/rocker/rocker_ofdpa.c
+++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
@@ -1933,7 +1933,7 @@ static int ofdpa_port_fdb(struct ofdpa_port *ofdpa_port,
spin_unlock_irqrestore(&ofdpa->fdb_tbl_lock, lock_flags);
/* Check if adding and already exists, or removing and can't find */
- if (!found != !removing) {
+ if (!found == removing) {
kfree(fdb);
if (!found && removing)
return 0;