diff options
Diffstat (limited to 'drivers/misc/sram.c')
| -rw-r--r-- | drivers/misc/sram.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index fc0415771c00..c5dc6095686a 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)  	 * after the reserved blocks from the dt are processed.  	 */  	nblocks = (np) ? of_get_available_child_count(np) + 1 : 1; -	rblocks = kzalloc((nblocks) * sizeof(*rblocks), GFP_KERNEL); +	rblocks = kcalloc(nblocks, sizeof(*rblocks), GFP_KERNEL);  	if (!rblocks)  		return -ENOMEM; @@ -264,8 +264,8 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)  	list_sort(NULL, &reserve_list, sram_reserve_cmp);  	if (exports) { -		sram->partition = devm_kzalloc(sram->dev, -				       exports * sizeof(*sram->partition), +		sram->partition = devm_kcalloc(sram->dev, +				       exports, sizeof(*sram->partition),  				       GFP_KERNEL);  		if (!sram->partition) {  			ret = -ENOMEM;  |