From 16709962c119a75d140da9dc226eeb9035e2c353 Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Thu, 15 Oct 2015 13:53:23 +0530 Subject: [PATCH] staging: rdma: hfi1: diag: Remove useless initialisation Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rdma/hfi1/diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c index 3d025d7c5a73..88414d720469 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, -- 2.20.1