diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-06 05:51:07 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-06 05:51:07 -0400 |
commit | 012e060c95e547eceea4a12c6f58592473bf4011 (patch) | |
tree | b57d3eafb50ce517577d2cf366c9ef0b4b286589 /drivers/base/attribute_container.c | |
parent | 923f122573851d18a3832ca808269fa2d5046fb1 (diff) | |
parent | ed39f731ab2e77e58122232f6e27333331d7793d (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/base/attribute_container.c')
-rw-r--r-- | drivers/base/attribute_container.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 373e7b728fa7..6b2eb6f39b4d 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c | |||
@@ -152,12 +152,13 @@ attribute_container_add_device(struct device *dev, | |||
152 | 152 | ||
153 | if (!cont->match(cont, dev)) | 153 | if (!cont->match(cont, dev)) |
154 | continue; | 154 | continue; |
155 | ic = kmalloc(sizeof(struct internal_container), GFP_KERNEL); | 155 | |
156 | ic = kzalloc(sizeof(*ic), GFP_KERNEL); | ||
156 | if (!ic) { | 157 | if (!ic) { |
157 | dev_printk(KERN_ERR, dev, "failed to allocate class container\n"); | 158 | dev_printk(KERN_ERR, dev, "failed to allocate class container\n"); |
158 | continue; | 159 | continue; |
159 | } | 160 | } |
160 | memset(ic, 0, sizeof(struct internal_container)); | 161 | |
161 | ic->cont = cont; | 162 | ic->cont = cont; |
162 | class_device_initialize(&ic->classdev); | 163 | class_device_initialize(&ic->classdev); |
163 | ic->classdev.dev = get_device(dev); | 164 | ic->classdev.dev = get_device(dev); |