diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2015-10-15 08:23:23 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 06:01:02 (GMT) |
commit | 16709962c119a75d140da9dc226eeb9035e2c353 (patch) | |
tree | 7aaf3f5644d3e005ca655b9e3df4b4b5ab942011 /drivers/staging/rdma/hfi1 | |
parent | 4690ba0d4f4b2699db6802ebcbd4e66358d67849 (diff) | |
download | linux-16709962c119a75d140da9dc226eeb9035e2c353.tar.xz |
staging: rdma: hfi1: diag: Remove useless initialisation
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>
Diffstat (limited to 'drivers/staging/rdma/hfi1')
-rw-r--r-- | drivers/staging/rdma/hfi1/diag.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c index 3d025d7..88414d7 100644 --- a/drivers/staging/rdma/hfi1/diag.c +++ b/drivers/staging/rdma/hfi1/diag.c @@ -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, |