提交 bd86ef37 编写于 作者: S Scott Wood 提交者: Kumar Gala

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: NScott Wood <scottwood@freescale.com>
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 d91e4ea7
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册