Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8772
b: refs/heads/master
c: 1107d2e
h: refs/heads/master
v: v3
  • Loading branch information
Peter Osterlund authored and Linus Torvalds committed Sep 13, 2005
1 parent 41ffe64 commit 4579bd4
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 06e7ab53f4a1e8bbf66c3985968468949d74d006
refs/heads/master: 1107d2e0352769b9bde6a4877c295b9309cdb877
9 changes: 3 additions & 6 deletions trunk/drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,9 @@ static struct bio *pkt_bio_alloc(int nr_iovecs)
goto no_bio;
bio_init(bio);

bvl = kmalloc(nr_iovecs * sizeof(struct bio_vec), GFP_KERNEL);
bvl = kcalloc(nr_iovecs, sizeof(struct bio_vec), GFP_KERNEL);
if (!bvl)
goto no_bvl;
memset(bvl, 0, nr_iovecs * sizeof(struct bio_vec));

bio->bi_max_vecs = nr_iovecs;
bio->bi_io_vec = bvl;
Expand All @@ -137,10 +136,9 @@ static struct packet_data *pkt_alloc_packet_data(void)
int i;
struct packet_data *pkt;

pkt = kmalloc(sizeof(struct packet_data), GFP_KERNEL);
pkt = kzalloc(sizeof(struct packet_data), GFP_KERNEL);
if (!pkt)
goto no_pkt;
memset(pkt, 0, sizeof(struct packet_data));

pkt->w_bio = pkt_bio_alloc(PACKET_MAX_SIZE);
if (!pkt->w_bio)
Expand Down Expand Up @@ -2492,10 +2490,9 @@ static int pkt_setup_dev(struct pkt_ctrl_command *ctrl_cmd)
return -EBUSY;
}

pd = kmalloc(sizeof(struct pktcdvd_device), GFP_KERNEL);
pd = kzalloc(sizeof(struct pktcdvd_device), GFP_KERNEL);
if (!pd)
return ret;
memset(pd, 0, sizeof(struct pktcdvd_device));

pd->rb_pool = mempool_create(PKT_RB_POOL_SIZE, pkt_rb_alloc, pkt_rb_free, NULL);
if (!pd->rb_pool)
Expand Down

0 comments on commit 4579bd4

Please sign in to comment.