diff --git a/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch b/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
index a832bf84ceb0249e60745aadca6b7c837ff267b3..e8bbe440027d283350ca594cbef6440a0cc77de2 100644
--- a/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
+++ b/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
@@ -18,12 +18,12 @@
  
 +static int ath79_request_ext_lna_gpio(unsigned chain, int gpio)
 +{
-+	char buf[32];
 +	char *label;
 +	int err;
 +
-+	scnprintf(buf, sizeof(buf), "external LNA%u", chain);
-+	label = kstrdup(buf, GFP_KERNEL);
++	label = kasprintf(GFP_KERNEL, "external LNA%u", chain);
++	if (!label)
++		return -ENOMEM;
 +
 +	err = gpio_request_one(gpio, GPIOF_DIR_OUT | GPIOF_INIT_LOW, label);
 +	if (err) {
diff --git a/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch b/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
index a832bf84ceb0249e60745aadca6b7c837ff267b3..e8bbe440027d283350ca594cbef6440a0cc77de2 100644
--- a/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
+++ b/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
@@ -18,12 +18,12 @@
  
 +static int ath79_request_ext_lna_gpio(unsigned chain, int gpio)
 +{
-+	char buf[32];
 +	char *label;
 +	int err;
 +
-+	scnprintf(buf, sizeof(buf), "external LNA%u", chain);
-+	label = kstrdup(buf, GFP_KERNEL);
++	label = kasprintf(GFP_KERNEL, "external LNA%u", chain);
++	if (!label)
++		return -ENOMEM;
 +
 +	err = gpio_request_one(gpio, GPIOF_DIR_OUT | GPIOF_INIT_LOW, label);
 +	if (err) {