Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23069
b: refs/heads/master
c: 40953ed
h: refs/heads/master
i:
  23067: 4458af3
v: v3
  • Loading branch information
Jes Sorensen authored and Linus Torvalds committed Mar 23, 2006
1 parent a2eb1d1 commit 1d3b2e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 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: 6b9438e1323a2be10dcc039f6321e7ca18b9459e
refs/heads/master: 40953ed87dd68742de0dd1bdecdcdfebfe1d69ae
8 changes: 3 additions & 5 deletions trunk/drivers/char/snsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2004 Silicon Graphics, Inc. All rights reserved.
* Copyright (C) 2004, 2006 Silicon Graphics, Inc. All rights reserved.
*/

/*
Expand Down Expand Up @@ -77,15 +77,14 @@ scdrv_open(struct inode *inode, struct file *file)
scd = container_of(inode->i_cdev, struct sysctl_data_s, scd_cdev);

/* allocate memory for subchannel data */
sd = kmalloc(sizeof (struct subch_data_s), GFP_KERNEL);
sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (sd == NULL) {
printk("%s: couldn't allocate subchannel data\n",
__FUNCTION__);
return -ENOMEM;
}

/* initialize subch_data_s fields */
memset(sd, 0, sizeof (struct subch_data_s));
sd->sd_nasid = scd->scd_nasid;
sd->sd_subch = ia64_sn_irtr_open(scd->scd_nasid);

Expand Down Expand Up @@ -394,15 +393,14 @@ scdrv_init(void)
sprintf(devnamep, "#%d", geo_slab(geoid));

/* allocate sysctl device data */
scd = kmalloc(sizeof (struct sysctl_data_s),
scd = kzalloc(sizeof (struct sysctl_data_s),
GFP_KERNEL);
if (!scd) {
printk("%s: failed to allocate device info"
"for %s/%s\n", __FUNCTION__,
SYSCTL_BASENAME, devname);
continue;
}
memset(scd, 0, sizeof (struct sysctl_data_s));

/* initialize sysctl device data fields */
scd->scd_nasid = cnodeid_to_nasid(cnode);
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/char/snsc_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,14 @@ scdrv_event_init(struct sysctl_data_s *scd)
{
int rv;

event_sd = kmalloc(sizeof (struct subch_data_s), GFP_KERNEL);
event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (event_sd == NULL) {
printk(KERN_WARNING "%s: couldn't allocate subchannel info"
" for event monitoring\n", __FUNCTION__);
return;
}

/* initialize subch_data_s fields */
memset(event_sd, 0, sizeof (struct subch_data_s));
event_sd->sd_nasid = scd->scd_nasid;
spin_lock_init(&event_sd->sd_rlock);

Expand All @@ -321,5 +320,3 @@ scdrv_event_init(struct sysctl_data_s *scd)
return;
}
}


0 comments on commit 1d3b2e8

Please sign in to comment.