diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-20 22:14:33 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:30:13 -0500 |
commit | 2afe37cdffa96f69c9096e6d4a10a275c9c7d2c9 (patch) | |
tree | b5898081aa18d60bf95595d906de39cc0e617787 /net/atm/mpc.c | |
parent | 66625984ca94552f75836596e0e83f3e5594bd58 (diff) |
[ATM]: Use kmemdup & kzalloc where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/atm/mpc.c')
-rw-r--r-- | net/atm/mpc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index f15f5d847860..c18f73715ef9 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -1322,13 +1322,12 @@ static void set_mps_mac_addr_rcvd(struct k_message *msg, struct mpoa_client *cli | |||
1322 | if(client->number_of_mps_macs) | 1322 | if(client->number_of_mps_macs) |
1323 | kfree(client->mps_macs); | 1323 | kfree(client->mps_macs); |
1324 | client->number_of_mps_macs = 0; | 1324 | client->number_of_mps_macs = 0; |
1325 | client->mps_macs = kmalloc(ETH_ALEN,GFP_KERNEL); | 1325 | client->mps_macs = kmemdup(msg->MPS_ctrl, ETH_ALEN, GFP_KERNEL); |
1326 | if (client->mps_macs == NULL) { | 1326 | if (client->mps_macs == NULL) { |
1327 | printk("mpoa: set_mps_mac_addr_rcvd: out of memory\n"); | 1327 | printk("mpoa: set_mps_mac_addr_rcvd: out of memory\n"); |
1328 | return; | 1328 | return; |
1329 | } | 1329 | } |
1330 | client->number_of_mps_macs = 1; | 1330 | client->number_of_mps_macs = 1; |
1331 | memcpy(client->mps_macs, msg->MPS_ctrl, ETH_ALEN); | ||
1332 | 1331 | ||
1333 | return; | 1332 | return; |
1334 | } | 1333 | } |