Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282891
b: refs/heads/master
c: 122f81d
h: refs/heads/master
i:
  282889: 1adae57
  282887: 3bd1f9e
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jan 9, 2012
1 parent 90e53d5 commit cd2f5a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 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: a88d2dc672192247a6f42c82d558db9bf9258bed
refs/heads/master: 122f81d773a464220d64f1a382bde073df281d5a
7 changes: 1 addition & 6 deletions trunk/drivers/mtd/devices/docprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,14 @@ static void __init DoC_Probe(unsigned long physadr)
return;
}
docfound = 1;
mtd = kmalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);

mtd = kzalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd) {
printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
iounmap(docptr);
return;
}

this = (struct DiskOnChip *)(&mtd[1]);

memset((char *)mtd,0, sizeof(struct mtd_info));
memset((char *)this, 0, sizeof(struct DiskOnChip));

mtd->priv = this;
this->virtadr = docptr;
this->physadr = physadr;
Expand Down

0 comments on commit cd2f5a1

Please sign in to comment.