Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63894
b: refs/heads/master
c: 1aebe18
h: refs/heads/master
v: v3
  • Loading branch information
Mariusz Kozlowski authored and Jens Axboe committed Aug 11, 2007
1 parent 33a13f6 commit ecd1cc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: 9b99628f8e9e0b5f5ecacce558defe529a6e00c1
refs/heads/master: 1aebe18787ca2e915eb8204d365ba2484d53223b
16 changes: 8 additions & 8 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1977,12 +1977,13 @@ cciss_read_capacity(int ctlr, int logvol, int withirq, sector_t *total_size,
{
ReadCapdata_struct *buf;
int return_code;
buf = kmalloc(sizeof(ReadCapdata_struct), GFP_KERNEL);
if (buf == NULL) {

buf = kzalloc(sizeof(ReadCapdata_struct), GFP_KERNEL);
if (!buf) {
printk(KERN_WARNING "cciss: out of memory\n");
return;
}
memset(buf, 0, sizeof(ReadCapdata_struct));

if (withirq)
return_code = sendcmd_withirq(CCISS_READ_CAPACITY,
ctlr, buf, sizeof(ReadCapdata_struct),
Expand All @@ -2003,20 +2004,20 @@ cciss_read_capacity(int ctlr, int logvol, int withirq, sector_t *total_size,
printk(KERN_INFO " blocks= %llu block_size= %d\n",
(unsigned long long)*total_size+1, *block_size);
kfree(buf);
return;
}

static void
cciss_read_capacity_16(int ctlr, int logvol, int withirq, sector_t *total_size, unsigned int *block_size)
{
ReadCapdata_struct_16 *buf;
int return_code;
buf = kmalloc(sizeof(ReadCapdata_struct_16), GFP_KERNEL);
if (buf == NULL) {

buf = kzalloc(sizeof(ReadCapdata_struct_16), GFP_KERNEL);
if (!buf) {
printk(KERN_WARNING "cciss: out of memory\n");
return;
}
memset(buf, 0, sizeof(ReadCapdata_struct_16));

if (withirq) {
return_code = sendcmd_withirq(CCISS_READ_CAPACITY_16,
ctlr, buf, sizeof(ReadCapdata_struct_16),
Expand All @@ -2038,7 +2039,6 @@ cciss_read_capacity_16(int ctlr, int logvol, int withirq, sector_t *total_size,
printk(KERN_INFO " blocks= %llu block_size= %d\n",
(unsigned long long)*total_size+1, *block_size);
kfree(buf);
return;
}

static int cciss_revalidate(struct gendisk *disk)
Expand Down

0 comments on commit ecd1cc5

Please sign in to comment.