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:
parent
251086f588
commit
77661208a8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue