Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77661208 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Kalle Valo
Browse files

brcmsmac: Use kstrdup to simplify code



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

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 251086f5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;