[PATCH 06/10] staging/irda/net: Delete an unnecessary variable initialisation in two functions

SF Markus Elfring elfring at users.sourceforge.net
Thu Oct 12 10:46:03 UTC 2017


From: Markus Elfring <elfring at users.sourceforge.net>
Date: Wed, 11 Oct 2017 22:22:13 +0200

The local variable "tx_skb" will only be used in a single if branch
of these functions. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
---
 drivers/staging/irda/net/irlap_frame.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/irda/net/irlap_frame.c b/drivers/staging/irda/net/irlap_frame.c
index 5b8be5b9812e..25ceb06efd58 100644
--- a/drivers/staging/irda/net/irlap_frame.c
+++ b/drivers/staging/irda/net/irlap_frame.c
@@ -862,7 +862,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
 void irlap_send_data_secondary_final(struct irlap_cb *self,
 				     struct sk_buff *skb)
 {
-	struct sk_buff *tx_skb = NULL;
+	struct sk_buff *tx_skb;
 
 	IRDA_ASSERT(self, return;);
 	IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -922,7 +922,7 @@ void irlap_send_data_secondary_final(struct irlap_cb *self,
  */
 void irlap_send_data_secondary(struct irlap_cb *self, struct sk_buff *skb)
 {
-	struct sk_buff *tx_skb = NULL;
+	struct sk_buff *tx_skb;
 
 	/* Is this reliable or unreliable data? */
 	if (skb->data[1] == I_FRAME) {
-- 
2.14.2



More information about the devel mailing list