Skip to contentSkip to conversation

mac802154: use goto label on failure

PATCH In review Varka Bhadram 4 participants 6 messages Dec 5, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mac802154: use goto label on failure

---
 net/mac802154/rx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/mac802154/rx.c +1 -2
index 041dbd5..c0d67b2 100644
@@ -85,8 +85,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
 	default:
 		spin_unlock_bh(&sdata->mib_lock);
 		pr_debug("invalid dest mode\n");
-		kfree_skb(skb);
-		return NET_RX_DROP;
+		goto fail;
 	}
 
 	spin_unlock_bh(&sdata->mib_lock);
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 cc2520: adds terminating newline

---
 drivers/net/ieee802154/cc2520.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/cc2520.c +1 -1
index ccbb082..f9df9fa 100644
@@ -858,7 +858,7 @@ static int cc2520_probe(struct spi_device *spi)
 	pinctrl = devm_pinctrl_get_select_default(&spi->dev);
 	if (IS_ERR(pinctrl))
 		dev_warn(&spi->dev,
-			 "pinctrl pins are not configured");
+			 "pinctrl pins are not configured\n");
 
 	pdata = cc2520_get_platform_data(spi);
 	if (!pdata) {
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH bluetooth-next 2/2] cc2520: adds terminating newline

Hi Varka,

Quoted 4 lines

---
drivers/net/ieee802154/cc2520.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

Reviewed-by on v1 1/2
#3 lore raw
In reply to Varka Bhadram

Hello.

Quoted 19 lines · Varka Bhadram
---
  net/mac802154/rx.c |    3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
net/mac802154/rx.c +1 -2
index 041dbd5..c0d67b2 100644
@@ -85,8 +85,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data
 *sdata,
  	default:
  		spin_unlock_bh(&sdata->mib_lock);
  		pr_debug("invalid dest mode\n");
-		kfree_skb(skb);
-		return NET_RX_DROP;
+		goto fail;
  	}
 
Quoted 2 lines
  	spin_unlock_bh(&sdata->mib_lock);

Good catch!

regards
Stefan Schmidt