spin_lock_init(&wl->isr_lock);
/* prepare ucode */
- if (wl_request_fw(wl, (struct pci_dev *)btparam)) {
+ if (wl_request_fw(wl, (struct pci_dev *)btparam) < 0) {
WL_ERROR("%s: Failed to find firmware usually in %s\n",
KBUILD_MODNAME, "/lib/firmware/brcm");
wl_release_fw(wl);
WL_ERROR("ERROR: ucode buf tag:%d can not be found!\n", idx);
*pbuf = NULL;
fail:
- return -1;
+ return BCME_NOTFOUND;
}
int wl_ucode_init_uint(struct wl_info *wl, u32 *data, u32 idx)
} else {
/* check if ucode section overruns firmware image */
ucode_hdr = (struct wl_fw_hdr *)fw_hdr->data;
- for (entry = 0; entry < wl->fw.hdr_num_entries[i] && rc;
- entry++, ucode_hdr++) {
+ for (entry = 0; entry < wl->fw.hdr_num_entries[i] &&
+ !rc; entry++, ucode_hdr++) {
if (ucode_hdr->offset + ucode_hdr->len >
fw->size) {
WL_ERROR("%s: conflicting bin/hdr\n",