summaryrefslogtreecommitdiffstats
path: root/drivers/net/amt.c
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2022-06-02 16:01:08 +0200
committerJakub Kicinski <kuba@kernel.org>2022-06-06 23:27:35 +0200
commitd7970039d87c926bb648982e920cb9851c19f3e1 (patch)
tree7f4f084ef37087a3bd3b431a56fdaae044b364ad /drivers/net/amt.c
parentamt: fix possible null-ptr-deref in amt_rcv() (diff)
downloadlinux-d7970039d87c926bb648982e920cb9851c19f3e1.tar.xz
linux-d7970039d87c926bb648982e920cb9851c19f3e1.zip
amt: fix wrong type string definition
amt message type definition starts from 1, not 0. But type_str[] starts from 0. So, it prints wrong type information. Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface") Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/amt.c')
-rw-r--r--drivers/net/amt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/amt.c b/drivers/net/amt.c
index ef483bf51033..be2719a3ba70 100644
--- a/drivers/net/amt.c
+++ b/drivers/net/amt.c
@@ -51,6 +51,7 @@ static char *status_str[] = {
};
static char *type_str[] = {
+ "", /* Type 0 is not defined */
"AMT_MSG_DISCOVERY",
"AMT_MSG_ADVERTISEMENT",
"AMT_MSG_REQUEST",