kmalloc/kzalloc changes:
dv1394, eth1394, ieee1394, ohci1394, pcilynx, raw1394, sbp2c, video1394: - use kzalloc - provide safer size arguments to kmalloc and kzalloc - omit some casts Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
This commit is contained in:
committed by
Jody McIntyre
parent
7afa146776
commit
8551158abc
@ -1435,7 +1435,7 @@ static int __devinit add_card(struct pci_dev *dev,
|
||||
struct i2c_algo_bit_data i2c_adapter_data;
|
||||
|
||||
error = -ENOMEM;
|
||||
i2c_ad = kmalloc(sizeof(struct i2c_adapter), SLAB_KERNEL);
|
||||
i2c_ad = kmalloc(sizeof(*i2c_ad), SLAB_KERNEL);
|
||||
if (!i2c_ad) FAIL("failed to allocate I2C adapter memory");
|
||||
|
||||
memcpy(i2c_ad, &bit_ops, sizeof(struct i2c_adapter));
|
||||
|
Reference in New Issue
Block a user