diff options
author | Alexandre Rusev <arusev@dev.rtsoft.ru> | 2011-10-27 10:18:37 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-11-24 03:00:42 -0500 |
commit | 7145cf12095265b8a292835d0f6da87f89fac1d1 (patch) | |
tree | 8a9220e1e82fe248b652d9bf3da96437b52e987b /arch/powerpc/sysdev/fsl_lbc.c | |
parent | 86f9a4330580b4ed3d5f7d5b0989ae69518c90f5 (diff) |
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: Alexandre Rusev <arusev@dev.rtsoft.ru>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_lbc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_lbc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index c4d96fa32ba5..d5c3c90ee698 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c | |||
@@ -328,6 +328,7 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) | |||
328 | err: | 328 | err: |
329 | iounmap(fsl_lbc_ctrl_dev->regs); | 329 | iounmap(fsl_lbc_ctrl_dev->regs); |
330 | kfree(fsl_lbc_ctrl_dev); | 330 | kfree(fsl_lbc_ctrl_dev); |
331 | fsl_lbc_ctrl_dev = NULL; | ||
331 | return ret; | 332 | return ret; |
332 | } | 333 | } |
333 | 334 | ||