]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath6kl/init.c
Merge remote-tracking branch 'arm-soc/for-next'
[karo-tx-linux.git] / drivers / net / wireless / ath / ath6kl / init.c
index fffd52355123f31e7bae15561fd867297d73f924..6ae0734f86e0f9e58053362307273921e9fdfd67 100644 (file)
@@ -715,6 +715,7 @@ static bool check_device_tree(struct ath6kl *ar)
                                   board_filename, ret);
                        continue;
                }
+               of_node_put(node);
                return true;
        }
        return false;
@@ -994,7 +995,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name)
                switch (ie_id) {
                case ATH6KL_FW_IE_FW_VERSION:
                        strlcpy(ar->wiphy->fw_version, data,
-                               sizeof(ar->wiphy->fw_version));
+                               min(sizeof(ar->wiphy->fw_version), ie_len+1));
 
                        ath6kl_dbg(ATH6KL_DBG_BOOT,
                                   "found fw version %s\n",
@@ -1049,7 +1050,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name)
                        ar->hw.reserved_ram_size = le32_to_cpup(val);
 
                        ath6kl_dbg(ATH6KL_DBG_BOOT,
-                                  "found reserved ram size ie 0x%d\n",
+                                  "found reserved ram size ie %d\n",
                                   ar->hw.reserved_ram_size);
                        break;
                case ATH6KL_FW_IE_CAPABILITIES: