summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/icom.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 18:50:24 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 18:50:24 -0800
commit2ad48ee810335bdd99de96e1a0796ba34c0e8301 (patch)
tree23fb16423129a22e3e866005883b4f461aadcd84 /drivers/tty/serial/icom.c
parentd30492adea3a82e7120bcf60893aaaab711f90a6 (diff)
parent4fbd269f1f9f8020dd9474b60e55c4f34d267b08 (diff)
Merge tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull serial fixes from Greg KH: "Here are tiny and assorted serial driver fixes that have been in a branch in my tree for a while and somehow did not get properly merged into my big TTY / Serial pull request for 3.14-rc1. Sorry about that. All have been in linux-next for a while with no issues" * tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: xuartps: Properly guard sysrq specific code serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip serial: icom: dereference after free in load_code() serial: 8250_dw: add new ACPI IDs tty: serial: pch: don't crash if DMA enabled but not loaded serial: samsung: move clock deactivation below uart registration
Diffstat (limited to 'drivers/tty/serial/icom.c')
-rw-r--r--drivers/tty/serial/icom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
index d98e43348970..67423805e6d9 100644
--- a/drivers/tty/serial/icom.c
+++ b/drivers/tty/serial/icom.c
@@ -455,11 +455,11 @@ static void load_code(struct icom_port *icom_port)
for (index = 0; index < fw->size; index++)
new_page[index] = fw->data[index];
- release_firmware(fw);
-
writeb((char) ((fw->size + 16)/16), &icom_port->dram->mac_length);
writel(temp_pci, &icom_port->dram->mac_load_addr);
+ release_firmware(fw);
+
/*Setting the syncReg to 0x80 causes adapter to start downloading
the personality code into adapter instruction RAM.
Once code is loaded, it will begin executing and, based on