summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-27 18:54:13 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-27 18:54:13 +0100
commit8f677bc819e7a74cf10e30daf06e8b151d1e6a94 (patch)
tree379e4e32a06dfb6d2ca3519ca4ef6b7507fad197 /drivers/net/bonding/bond_main.c
parenta3caeb8ffe5d2bbe01da66081f0ef28c26302d99 (diff)
parentd6d5df1db6e9d7f8f76d2911707f7d5877251b02 (diff)
Merge 5.4-rc5 into driver-core-next
We want the sysfs fix in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 931d9d935686..21d8fcc83c9c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4039,7 +4039,7 @@ out:
* this to-be-skipped slave to send a packet out.
*/
old_arr = rtnl_dereference(bond->slave_arr);
- for (idx = 0; idx < old_arr->count; idx++) {
+ for (idx = 0; old_arr != NULL && idx < old_arr->count; idx++) {
if (skipslave == old_arr->arr[idx]) {
old_arr->arr[idx] =
old_arr->arr[old_arr->count-1];