diff options
Diffstat (limited to 'drivers/net/wan/farsync.c')
-rw-r--r-- | drivers/net/wan/farsync.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 58a53b6d9b42..12dae8e24844 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -2476,13 +2476,12 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2476 | } | 2476 | } |
2477 | 2477 | ||
2478 | /* Allocate driver private data */ | 2478 | /* Allocate driver private data */ |
2479 | card = kmalloc(sizeof (struct fst_card_info), GFP_KERNEL); | 2479 | card = kzalloc(sizeof (struct fst_card_info), GFP_KERNEL); |
2480 | if (card == NULL) { | 2480 | if (card == NULL) { |
2481 | printk_err("FarSync card found but insufficient memory for" | 2481 | printk_err("FarSync card found but insufficient memory for" |
2482 | " driver storage\n"); | 2482 | " driver storage\n"); |
2483 | return -ENOMEM; | 2483 | return -ENOMEM; |
2484 | } | 2484 | } |
2485 | memset(card, 0, sizeof (struct fst_card_info)); | ||
2486 | 2485 | ||
2487 | /* Try to enable the device */ | 2486 | /* Try to enable the device */ |
2488 | if ((err = pci_enable_device(pdev)) != 0) { | 2487 | if ((err = pci_enable_device(pdev)) != 0) { |