Commit eba43fac authored by wengjianfeng's avatar wengjianfeng Committed by David S. Miller
Browse files

nfc: st-nci: remove unnecessary label



in st_nci_spi_write function, first assign a value to a variable then
goto exit label. return statement just follow the label and exit label
just used once, so we should directly return and remove exit label.

Signed-off-by: default avatarwengjianfeng <wengjianfeng@yulong.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 334c4241
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -95,17 +95,14 @@ static int st_nci_spi_write(void *phy_id, struct sk_buff *skb)
	 */
	if (!r) {
		skb_rx = alloc_skb(skb->len, GFP_KERNEL);
		if (!skb_rx) {
			r = -ENOMEM;
			goto exit;
		}
		if (!skb_rx)
			return -ENOMEM;

		skb_put(skb_rx, skb->len);
		memcpy(skb_rx->data, buf, skb->len);
		ndlc_recv(phy->ndlc, skb_rx);
	}

exit:
	return r;
}