summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2009-04-03 22:48:44 +0200
committerKumar Gala <galak@kernel.crashing.org>2009-04-06 16:09:28 +0200
commitbd86ef378412fc30282daf722a833f734e4e2236 (patch)
treea93bd59ef3857747d94808b58f508b8d94c77f2f /drivers
parentpowerpc: Add support for CoreInt delivery of interrupts on MPIC (diff)
downloadlinux-bd86ef378412fc30282daf722a833f734e4e2236.tar.xz
linux-bd86ef378412fc30282daf722a833f734e4e2236.zip
cpm_uart: Initialize port.dev before it's used.
Previously, this caused NULL to sometimes be passed as a device to the DMA code. With recent DMA changes, that now causes a BUG(). Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 5c6ef51da274..4dd00bea191a 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1339,13 +1339,13 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
dev_set_drvdata(&ofdev->dev, pinfo);
+ /* initialize the device pointer for the port */
+ pinfo->port.dev = &ofdev->dev;
+
ret = cpm_uart_init_port(ofdev->node, pinfo);
if (ret)
return ret;
- /* initialize the device pointer for the port */
- pinfo->port.dev = &ofdev->dev;
-
return uart_add_one_port(&cpm_reg, &pinfo->port);
}