diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2015-07-08 22:22:46 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-07-21 17:59:26 +0300 |
commit | 77661208a87b458f353fd0b7a4729cf2887449a6 (patch) | |
tree | 4adc8775fad8f8bd5e2013fda489fd4d02644f4c | |
parent | 251086f588720277a6f5782020a648ce32c4e00b (diff) |
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>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index ab775a5d5b33..d2c5747e3ac9 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c @@ -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; |