diff options
Diffstat (limited to 'drivers/misc/sram.c')
-rw-r--r-- | drivers/misc/sram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index fc0415771c00..e2e31b65bc5a 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c | |||
@@ -185,7 +185,7 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res) | |||
185 | * after the reserved blocks from the dt are processed. | 185 | * after the reserved blocks from the dt are processed. |
186 | */ | 186 | */ |
187 | nblocks = (np) ? of_get_available_child_count(np) + 1 : 1; | 187 | nblocks = (np) ? of_get_available_child_count(np) + 1 : 1; |
188 | rblocks = kzalloc((nblocks) * sizeof(*rblocks), GFP_KERNEL); | 188 | rblocks = kcalloc(nblocks, sizeof(*rblocks), GFP_KERNEL); |
189 | if (!rblocks) | 189 | if (!rblocks) |
190 | return -ENOMEM; | 190 | return -ENOMEM; |
191 | 191 | ||