Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195942
b: refs/heads/master
c: ecce2a6
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and David Woodhouse committed May 13, 2010
1 parent f52d3fc commit 6869546
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aadff49c56f921d18cc280cbf087a550c67bbd02
refs/heads/master: ecce2a6f9bdc7635838baeff8a09a76c9a70e7e0
7 changes: 2 additions & 5 deletions trunk/drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,14 +929,13 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)

pr_debug("s3c2410_nand_probe(%p)\n", pdev);

info = kmalloc(sizeof(*info), GFP_KERNEL);
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (info == NULL) {
dev_err(&pdev->dev, "no memory for flash info\n");
err = -ENOMEM;
goto exit_error;
}

memset(info, 0, sizeof(*info));
platform_set_drvdata(pdev, info);

spin_lock_init(&info->controller.lock);
Expand Down Expand Up @@ -994,15 +993,13 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
/* allocate our information */

size = nr_sets * sizeof(*info->mtds);
info->mtds = kmalloc(size, GFP_KERNEL);
info->mtds = kzalloc(size, GFP_KERNEL);
if (info->mtds == NULL) {
dev_err(&pdev->dev, "failed to allocate mtd storage\n");
err = -ENOMEM;
goto exit_error;
}

memset(info->mtds, 0, size);

/* initialise all possible chips */

nmtd = info->mtds;
Expand Down

0 comments on commit 6869546

Please sign in to comment.