staging: rdma: hfi1: Remove unnecessary variable
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 29 Oct 2015 08:05:06 +0000 (13:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
Drop unnecessary variable that can be replaced by a single line of
code.

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

index ffdb1d787a80bd3bc657ba33b632c44e0ecfc055..6326a915d7fd30ed4ae92bd4c51569fc16f360af 100644 (file)
@@ -475,7 +475,7 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len)
        u8 *cache = &ppd->qsfp_info.cache[0];
        u8 bin_buff[QSFP_DUMP_CHUNK];
        char lenstr[6];
-       int sofar, ret;
+       int sofar;
        int bidx = 0;
        u8 *atten = &cache[QSFP_ATTEN_OFFS];
        u8 *vendor_oui = &cache[QSFP_VOUI_OFFS];
@@ -536,6 +536,5 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len)
                        bidx += QSFP_DUMP_CHUNK;
                }
        }
-       ret = sofar;
-       return ret;
+       return sofar;
 }