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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux