diff options
author | simran singhal <singhalsimran0@gmail.com> | 2017-02-22 07:31:09 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:16:58 +0100 |
commit | ca5af1f303d16cdf183354abffba46528b72a163 (patch) | |
tree | e5177364b43655c411e1f20541aa7aa447c40eb5 | |
parent | efe96779e55eb59c1d22c9b89b655b639aea6c99 (diff) |
staging: gdm724x: Drop useless initialisation
Removed initialisation of a varible if it is immediately reassigned.
Changes were made using Coccinelle.
@@
type T;
constant C;
expression e;
identifier i;
@@
T i
- = C
;
i = e;
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/gdm724x/gdm_lte.c | 2 | ||||
-rw-r--r-- | drivers/staging/gdm724x/gdm_mux.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index 904be6a2f1fb..cf809987f79f 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -350,7 +350,7 @@ static s32 gdm_lte_tx_nic_type(struct net_device *dev, struct sk_buff *skb) struct ipv6hdr *ipv6; int mac_proto; void *network_data; - u32 nic_type = 0; + u32 nic_type; /* NIC TYPE is based on the nic_id of this net_device */ nic_type = 0x00000010 | nic->nic_id; diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index 400969170d1c..aba32e22db0c 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -62,7 +62,7 @@ static int packet_type_to_index(u16 packetType) static struct mux_tx *alloc_mux_tx(int len) { - struct mux_tx *t = NULL; + struct mux_tx *t; t = kzalloc(sizeof(*t), GFP_ATOMIC); if (!t) @@ -91,7 +91,7 @@ static void free_mux_tx(struct mux_tx *t) static struct mux_rx *alloc_mux_rx(void) { - struct mux_rx *r = NULL; + struct mux_rx *r; r = kzalloc(sizeof(*r), GFP_KERNEL); if (!r) |