summaryrefslogtreecommitdiffstats
path: root/drivers/soc/hisilicon/kunpeng_hccs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/hisilicon/kunpeng_hccs.c')
-rw-r--r--drivers/soc/hisilicon/kunpeng_hccs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
index 9ff70b38e5..e882a61636 100644
--- a/drivers/soc/hisilicon/kunpeng_hccs.c
+++ b/drivers/soc/hisilicon/kunpeng_hccs.c
@@ -556,6 +556,12 @@ static int hccs_get_all_port_attr(struct hccs_dev *hdev,
start_id = rsp_head.next_id;
}
+ if (left_buf_len != 0) {
+ dev_err(hdev->dev, "failed to get the expected port number(%u) attribute.\n",
+ size);
+ return -EINVAL;
+ }
+
return 0;
}