diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2013-12-07 01:43:37 +0100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-12-10 01:25:04 +0100 |
commit | 1b429835be7ce514b36b551e785d425fd56cd1f2 (patch) | |
tree | 6696b1ef3296dd0d0298744bb8a1b3eedb59b3eb | |
parent | powerpc: Fix build break with PPC_EARLY_DEBUG_BOOTX=y (diff) | |
download | linux-1b429835be7ce514b36b551e785d425fd56cd1f2.tar.xz linux-1b429835be7ce514b36b551e785d425fd56cd1f2.zip |
powerpc/44x: Fix ocm_block allocation
Allocate enough memory for the ocm_block structure, not just a pointer
to it.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_ocm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/ppc4xx_ocm.c b/arch/powerpc/sysdev/ppc4xx_ocm.c index b7c43453236d..85d9e37f5ccb 100644 --- a/arch/powerpc/sysdev/ppc4xx_ocm.c +++ b/arch/powerpc/sysdev/ppc4xx_ocm.c @@ -339,7 +339,7 @@ void *ppc4xx_ocm_alloc(phys_addr_t *phys, int size, int align, if (IS_ERR_VALUE(offset)) continue; - ocm_blk = kzalloc(sizeof(struct ocm_block *), GFP_KERNEL); + ocm_blk = kzalloc(sizeof(struct ocm_block), GFP_KERNEL); if (!ocm_blk) { printk(KERN_ERR "PPC4XX OCM: could not allocate ocm block"); rh_free(ocm_reg->rh, offset); |