From 2afe37cdffa96f69c9096e6d4a10a275c9c7d2c9 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 21 Nov 2006 01:14:33 -0200 Subject: [ATM]: Use kmemdup & kzalloc where applicable Signed-off-by: Arnaldo Carvalho de Melo --- net/atm/mpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/atm/mpc.c') 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 if(client->number_of_mps_macs) kfree(client->mps_macs); client->number_of_mps_macs = 0; - client->mps_macs = kmalloc(ETH_ALEN,GFP_KERNEL); + client->mps_macs = kmemdup(msg->MPS_ctrl, ETH_ALEN, GFP_KERNEL); if (client->mps_macs == NULL) { printk("mpoa: set_mps_mac_addr_rcvd: out of memory\n"); return; } client->number_of_mps_macs = 1; - memcpy(client->mps_macs, msg->MPS_ctrl, ETH_ALEN); return; } -- cgit v1.2.3