Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195943
b: refs/heads/master
c: 2bfefa4
h: refs/heads/master
i:
  195941: f52d3fc
  195939: b037ece
  195935: c166d67
v: v3
  • Loading branch information
Julia Lawall authored and David Woodhouse committed May 13, 2010
1 parent 6869546 commit 1110403
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 22 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: ecce2a6f9bdc7635838baeff8a09a76c9a70e7e0
refs/heads/master: 2bfefa4c9632fb09bfe3277cf7b690818b147654
7 changes: 2 additions & 5 deletions trunk/drivers/mtd/lpddr/qinfo_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,12 @@ static int lpddr_pfow_present(struct map_info *map, struct lpddr_private *lpddr)
static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr)
{

lpddr->qinfo = kmalloc(sizeof(struct qinfo_chip), GFP_KERNEL);
lpddr->qinfo = kzalloc(sizeof(struct qinfo_chip), GFP_KERNEL);
if (!lpddr->qinfo) {
printk(KERN_WARNING "%s: no memory for LPDDR qinfo structure\n",
map->name);
return 0;
}
memset(lpddr->qinfo, 0, sizeof(struct qinfo_chip));

/* Get the ManuID */
lpddr->ManufactId = CMDVAL(map_read(map, map->pfow_base + PFOW_MANUFACTURER_ID));
Expand Down Expand Up @@ -185,13 +184,11 @@ static struct lpddr_private *lpddr_probe_chip(struct map_info *map)
lpddr.numchips = 1;

numvirtchips = lpddr.numchips * lpddr.qinfo->HWPartsNum;
retlpddr = kmalloc(sizeof(struct lpddr_private) +
retlpddr = kzalloc(sizeof(struct lpddr_private) +
numvirtchips * sizeof(struct flchip), GFP_KERNEL);
if (!retlpddr)
return NULL;

memset(retlpddr, 0, sizeof(struct lpddr_private) +
numvirtchips * sizeof(struct flchip));
memcpy(retlpddr, &lpddr, sizeof(struct lpddr_private));

retlpddr->numchips = numvirtchips;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/maps/ixp2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,11 @@ static int ixp2000_flash_probe(struct platform_device *dev)
return -EIO;
}

info = kmalloc(sizeof(struct ixp2000_flash_info), GFP_KERNEL);
info = kzalloc(sizeof(struct ixp2000_flash_info), GFP_KERNEL);
if(!info) {
err = -ENOMEM;
goto Error;
}
memset(info, 0, sizeof(struct ixp2000_flash_info));

platform_set_drvdata(dev, info);

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/maps/ixp4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,11 @@ static int ixp4xx_flash_probe(struct platform_device *dev)
return err;
}

info = kmalloc(sizeof(struct ixp4xx_flash_info), GFP_KERNEL);
info = kzalloc(sizeof(struct ixp4xx_flash_info), GFP_KERNEL);
if(!info) {
err = -ENOMEM;
goto Error;
}
memset(info, 0, sizeof(struct ixp4xx_flash_info));

platform_set_drvdata(dev, info);

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/maps/pxa2xx-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ static int __init pxa2xx_flash_probe(struct platform_device *pdev)
if (!res)
return -ENODEV;

info = kmalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL);
info = kzalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL);
if (!info)
return -ENOMEM;

memset(info, 0, sizeof(struct pxa2xx_flash_info));
info->map.name = (char *) flash->name;
info->map.bankwidth = flash->width;
info->map.phys = res->start;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/tests/mtd_pagetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,11 @@ static int scan_for_bad_eraseblocks(void)
{
int i, bad = 0;

bbt = kmalloc(ebcnt, GFP_KERNEL);
bbt = kzalloc(ebcnt, GFP_KERNEL);
if (!bbt) {
printk(PRINT_PREF "error: cannot allocate memory\n");
return -ENOMEM;
}
memset(bbt, 0 , ebcnt);

printk(PRINT_PREF "scanning for bad eraseblocks\n");
for (i = 0; i < ebcnt; ++i) {
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/tests/mtd_readtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,11 @@ static int scan_for_bad_eraseblocks(void)
{
int i, bad = 0;

bbt = kmalloc(ebcnt, GFP_KERNEL);
bbt = kzalloc(ebcnt, GFP_KERNEL);
if (!bbt) {
printk(PRINT_PREF "error: cannot allocate memory\n");
return -ENOMEM;
}
memset(bbt, 0 , ebcnt);

/* NOR flash does not implement block_isbad */
if (mtd->block_isbad == NULL)
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/tests/mtd_speedtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,11 @@ static int scan_for_bad_eraseblocks(void)
{
int i, bad = 0;

bbt = kmalloc(ebcnt, GFP_KERNEL);
bbt = kzalloc(ebcnt, GFP_KERNEL);
if (!bbt) {
printk(PRINT_PREF "error: cannot allocate memory\n");
return -ENOMEM;
}
memset(bbt, 0 , ebcnt);

/* NOR flash does not implement block_isbad */
if (mtd->block_isbad == NULL)
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/tests/mtd_stresstest.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,11 @@ static int scan_for_bad_eraseblocks(void)
{
int i, bad = 0;

bbt = kmalloc(ebcnt, GFP_KERNEL);
bbt = kzalloc(ebcnt, GFP_KERNEL);
if (!bbt) {
printk(PRINT_PREF "error: cannot allocate memory\n");
return -ENOMEM;
}
memset(bbt, 0 , ebcnt);

/* NOR flash does not implement block_isbad */
if (mtd->block_isbad == NULL)
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/mtd/tests/mtd_subpagetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,11 @@ static int scan_for_bad_eraseblocks(void)
{
int i, bad = 0;

bbt = kmalloc(ebcnt, GFP_KERNEL);
bbt = kzalloc(ebcnt, GFP_KERNEL);
if (!bbt) {
printk(PRINT_PREF "error: cannot allocate memory\n");
return -ENOMEM;
}
memset(bbt, 0 , ebcnt);

printk(PRINT_PREF "scanning for bad eraseblocks\n");
for (i = 0; i < ebcnt; ++i) {
Expand Down

0 comments on commit 1110403

Please sign in to comment.