staging: rdma: hfi1: diag: Remove useless initialisation
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 15 Oct 2015 08:23:23 +0000 (13:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 06:01:02 +0000 (23:01 -0700)
Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c

index 3d025d7c5a7377fd5ecd320efb7f49ea86eeb372..88414d720469f17599b6e98766496529fc1f9a0f 100644 (file)
@@ -607,7 +607,7 @@ static int hfi1_snoop_add(struct hfi1_devdata *dd, const char *name)
 static struct hfi1_devdata *hfi1_dd_from_sc_inode(struct inode *in)
 {
        int unit = iminor(in) - HFI1_SNOOP_CAPTURE_BASE;
-       struct hfi1_devdata *dd = NULL;
+       struct hfi1_devdata *dd;
 
        dd = hfi1_lookup(unit);
        return dd;
@@ -1477,7 +1477,7 @@ static struct snoop_packet *allocate_snoop_packet(u32 hdr_len,
                                                  u32 md_len)
 {
 
-       struct snoop_packet *packet = NULL;
+       struct snoop_packet *packet;
 
        packet = kzalloc(sizeof(struct snoop_packet) + hdr_len + data_len
                         + md_len,
This page took 0.02754 seconds and 5 git commands to generate.