From dc2744f922219323bc7497fc656cdd4b7b5eae43 Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Mon, 5 Sep 2016 17:33:01 +0300 Subject: [PATCH] P2P: Fix common frequencies calculation for a group Ignore group members for which there is no supported channels information when calculating common group frequencies. Signed-off-by: Ilan Peer --- src/p2p/p2p_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c index 3aed6bdc9..051b4e391 100644 --- a/src/p2p/p2p_group.c +++ b/src/p2p/p2p_group.c @@ -1112,7 +1112,7 @@ int p2p_group_get_common_freqs(struct p2p_group *group, int *common_freqs, struct p2p_device *dev; dev = p2p_get_device(group->p2p, m->dev_addr); - if (!dev) + if (!dev || dev->channels.reg_classes == 0) continue; p2p_channels_intersect(&intersect, &dev->channels, &res);