提交 7145cf12 编写于 作者: A Alexandre Rusev 提交者: Kumar Gala

powerpc/fsl-lbc: Fix for fsl_upm

If Freescale LBC driver fails to initialise itself from device tree, then
internal structure is freed only but not NULL-fied.  As result functions
fsl_lbc_find() after checking the structure is not NULL are trying to
access device registers.
Signed-off-by: NAlexandre Rusev <arusev@dev.rtsoft.ru>
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 86f9a433
...@@ -328,6 +328,7 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) ...@@ -328,6 +328,7 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev)
err: err:
iounmap(fsl_lbc_ctrl_dev->regs); iounmap(fsl_lbc_ctrl_dev->regs);
kfree(fsl_lbc_ctrl_dev); kfree(fsl_lbc_ctrl_dev);
fsl_lbc_ctrl_dev = NULL;
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册