]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rocker: Simplify if condition in ofdpa_port_fdb()
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 7 Apr 2025 09:14:42 +0000 (11:14 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Apr 2025 11:11:29 +0000 (13:11 +0200)
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>
drivers/net/ethernet/rocker/rocker_ofdpa.c

index 826990459fa4438554c4bca44446adbbcce0ae7c..8832bfdd88330b9e63d67284668d303c9d5459f5 100644 (file)
@@ -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;