Skip to content

Commit

Permalink
powerpc/fsl-lbc: Fix for fsl_upm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Rusev authored and Kumar Gala committed Nov 24, 2011
1 parent 86f9a43 commit 7145cf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/sysdev/fsl_lbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev)
err:
iounmap(fsl_lbc_ctrl_dev->regs);
kfree(fsl_lbc_ctrl_dev);
fsl_lbc_ctrl_dev = NULL;
return ret;
}

Expand Down

0 comments on commit 7145cf1

Please sign in to comment.