提交 878e3c1b 编写于 作者: I Igal Liberman 提交者: David S. Miller

fsl/fman: Initialize fman->dev earlier

Currently, in a case of error, dev_err is using fman->dev
before its initialization and "(NULL device *)" is printed.
This patch fixes this issue.
Signed-off-by: NIgal Liberman <igal.liberman@freescale.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 88f8b1bb
......@@ -2791,6 +2791,8 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
goto fman_free;
}
fman->dev = &of_dev->dev;
return fman;
fman_node_put:
......@@ -2845,8 +2847,6 @@ static int fman_probe(struct platform_device *of_dev)
dev_set_drvdata(dev, fman);
fman->dev = dev;
dev_dbg(dev, "FMan%d probed\n", fman->dts_params.id);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册