aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/pcilynx.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-10-29 23:13:40 +0300
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 21:43:02 +0100
commitbfe89d724527c8b1bb1b68b0da1d94907b094094 (patch)
tree515e4bcf9e4f6c5cccdeb4ce724e891a1bfa28f2 /drivers/ieee1394/pcilynx.c
parent5f8d17f6023ea9aca7c0063c5b472529f2664944 (diff)
downloadkernel_samsung_smdk4412-bfe89d724527c8b1bb1b68b0da1d94907b094094.zip
kernel_samsung_smdk4412-bfe89d724527c8b1bb1b68b0da1d94907b094094.tar.gz
kernel_samsung_smdk4412-bfe89d724527c8b1bb1b68b0da1d94907b094094.tar.bz2
drivers/ieee1394/*: use kmemdup()
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/pcilynx.c')
-rw-r--r--drivers/ieee1394/pcilynx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
index 9cab1d6..13a6179 100644
--- a/drivers/ieee1394/pcilynx.c
+++ b/drivers/ieee1394/pcilynx.c
@@ -1428,10 +1428,9 @@ static int __devinit add_card(struct pci_dev *dev,
struct i2c_algo_bit_data i2c_adapter_data;
error = -ENOMEM;
- i2c_ad = kmalloc(sizeof(*i2c_ad), GFP_KERNEL);
+ i2c_ad = kmemdup(&bit_ops, sizeof(*i2c_ad), GFP_KERNEL);
if (!i2c_ad) FAIL("failed to allocate I2C adapter memory");
- memcpy(i2c_ad, &bit_ops, sizeof(struct i2c_adapter));
i2c_adapter_data = bit_data;
i2c_ad->algo_data = &i2c_adapter_data;
i2c_adapter_data.data = lynx;