|
@@ -122,8 +122,7 @@ static int wl1251_fetch_nvs(struct wl1251 *wl)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- wl->nvs_len = fw->size;
|
|
|
- wl->nvs = kmemdup(fw->data, wl->nvs_len, GFP_KERNEL);
|
|
|
+ wl->nvs = kmemdup(fw->data, fw->size, GFP_KERNEL);
|
|
|
|
|
|
if (!wl->nvs) {
|
|
|
wl1251_error("could not allocate memory for the nvs file");
|
|
@@ -131,6 +130,8 @@ static int wl1251_fetch_nvs(struct wl1251 *wl)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
+ wl->nvs_len = fw->size;
|
|
|
+
|
|
|
ret = 0;
|
|
|
|
|
|
out:
|