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 <emmanuel.grumbach@intel.com>
Reviewed-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Emmanuel Grumbach 2013-06-11 15:17:21 +03:00 committed by Johannes Berg
parent 0742a75a72
commit 476a9e09cb

View File

@ -413,6 +413,9 @@ static int iwl_phy_db_send_all_channel_groups(
if (!entry) if (!entry)
return -EINVAL; return -EINVAL;
if (WARN_ON_ONCE(!entry->size))
continue;
/* Send the requested PHY DB section */ /* Send the requested PHY DB section */
err = iwl_send_phy_db_cmd(phy_db, err = iwl_send_phy_db_cmd(phy_db,
type, type,