From: Emmanuel Grumbach Date: Tue, 11 Jun 2013 12:17:21 +0000 (+0300) Subject: iwlwifi: ignore 0-length PHY DB sections X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=476a9e09cbe37bad93de6e460b76f89f3ad22c9b;p=linux-beck.git iwlwifi: ignore 0-length PHY DB sections This can happen during development but can cause problems, WARN (once) and go on. Signed-off-by: Emmanuel Grumbach Reviewed-by: Guy Cohen Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/iwlwifi/iwl-phy-db.c b/drivers/net/wireless/iwlwifi/iwl-phy-db.c index 25745daa0d5d..84acb4deca8a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-phy-db.c +++ b/drivers/net/wireless/iwlwifi/iwl-phy-db.c @@ -413,6 +413,9 @@ static int iwl_phy_db_send_all_channel_groups( if (!entry) return -EINVAL; + if (WARN_ON_ONCE(!entry->size)) + continue; + /* Send the requested PHY DB section */ err = iwl_send_phy_db_cmd(phy_db, type,