]> git.baikalelectronics.ru Git - kernel.git/commitdiff
amt: fix wrong type string definition
authorTaehee Yoo <ap420073@gmail.com>
Thu, 2 Jun 2022 14:01:08 +0000 (14:01 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 6 Jun 2022 21:27:35 +0000 (14:27 -0700)
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>
drivers/net/amt.c

index ef483bf510330cc188b6038a4315a554887958a7..be2719a3ba702b634feb190cebeebe288b8adc56 100644 (file)
@@ -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",