lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 06/10] staging/irda/net: Delete an unnecessary variable initialisation in two functions
From
Date
From: Markus Elfring <elfring@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@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
\
 
 \ /
  Last update: 2017-10-12 12:47    [W:0.072 / U:5.756 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site