net: hns3: remove redundant assignment to pointer reg_info
authorColin Ian King <colin.king@canonical.com>
Sat, 31 Aug 2019 07:29:49 +0000 (08:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Sep 2019 19:12:16 +0000 (12:12 -0700)
Pointer reg_info is being initialized with a value that is never read and
is being re-assigned a little later on. The assignment is redundant
and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c

index 1debe37fe735fffc8c1994ff595c7cfe84baa2be..1c6b501fb7ca351cfed48f66f1bd8a7098072acb 100644 (file)
@@ -279,7 +279,7 @@ static void hclge_dbg_dump_dcb(struct hclge_dev *hdev, const char *cmd_buf)
 
 static void hclge_dbg_dump_reg_cmd(struct hclge_dev *hdev, const char *cmd_buf)
 {
-       struct hclge_dbg_reg_type_info *reg_info = &hclge_dbg_reg_info[0];
+       struct hclge_dbg_reg_type_info *reg_info;
        bool has_dump = false;
        int i;