]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: ignore 0-length PHY DB sections
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 11 Jun 2013 12:17:21 +0000 (15:17 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 Jun 2013 18:12:02 +0000 (20:12 +0200)
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>
drivers/net/wireless/iwlwifi/iwl-phy-db.c

index 25745daa0d5da4142abef88f506b8bee614d8905..84acb4deca8a0fb2509456280cbb5b8250bedd09 100644 (file)
@@ -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,