Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99a3d2e authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

bond_3ad.c avoid possible null deref



A few lines earlier we assume that best->slave could be either null or non-null so
we should check it here as well.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f044931
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1580,7 +1580,7 @@ static void ad_agg_selection_logic(struct aggregator *agg)
		// check if any partner replys
		if (best->is_individual) {
			pr_warning("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
				   best->slave->dev->master->name);
				   best->slave ? best->slave->dev->master->name : "NULL");
		}

		best->is_active = 1;