brcmsmac: Use kstrdup to simplify code

Replace a kmalloc+strcpy by an equivalent kstrdup in order to improve
readability.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Christophe Jaillet 2015-07-08 22:22:46 +02:00 committed by Kalle Valo
parent 251086f588
commit 77661208a8
1 changed files with 1 additions and 3 deletions

View File

@ -1472,9 +1472,7 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
wl->timers = t;
#ifdef DEBUG
t->name = kmalloc(strlen(name) + 1, GFP_ATOMIC);
if (t->name)
strcpy(t->name, name);
t->name = kstrdup(name, GFP_ATOMIC);
#endif
return t;