Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352826
b: refs/heads/master
c: 488ec87
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Amit Mehta authored and John W. Linville committed Feb 18, 2013
1 parent 4c3733f commit f55f2d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc6b89237acb3dee6af6e64e51a18255fef89cc2
refs/heads/master: 488ec878034eccb852267b0e27ce9d511f75c587
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/orinoco/orinoco_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,10 +804,15 @@ static inline int ezusb_8051_cpucs(struct ezusb_priv *upriv, int reset)
static int ezusb_firmware_download(struct ezusb_priv *upriv,
struct ez_usb_fw *fw)
{
u8 fw_buffer[FW_BUF_SIZE];
u8 *fw_buffer;
int retval, addr;
int variant_offset;

fw_buffer = kmalloc(FW_BUF_SIZE, GFP_KERNEL);
if (!fw_buffer) {
printk(KERN_ERR PFX "Out of memory for firmware buffer.\n");
return -ENOMEM;
}
/*
* This byte is 1 and should be replaced with 0. The offset is
* 0x10AD in version 0.0.6. The byte in question should follow
Expand Down Expand Up @@ -859,6 +864,7 @@ static int ezusb_firmware_download(struct ezusb_priv *upriv,
printk(KERN_ERR PFX "Firmware download failed, error %d\n",
retval);
exit:
kfree(fw_buffer);
return retval;
}

Expand Down Expand Up @@ -1681,7 +1687,8 @@ static int ezusb_probe(struct usb_interface *interface,
firmware.code = fw_entry->data;
}
if (firmware.size && firmware.code) {
ezusb_firmware_download(upriv, &firmware);
if (ezusb_firmware_download(upriv, &firmware))
goto error;
} else {
err("No firmware to download");
goto error;
Expand Down

0 comments on commit f55f2d0

Please sign in to comment.