From: Koby Elbaz Date: Wed, 22 Jun 2022 07:42:42 +0000 (+0300) Subject: habanalabs/gaudi: fix warning: var might be used uninitialized X-Git-Tag: baikal/mips/sdk6.1~5150^2~27^2~59 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=58a6e5b58d07fd212372959c991b3d90554594a9;p=kernel.git habanalabs/gaudi: fix warning: var might be used uninitialized kernel test robot: "warning: variable 'index' is used uninitialized whenever 'if' condition is false" Reported-by: kernel test robot Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 939d2636b9ed4..172c21f262e73 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -7388,7 +7388,7 @@ static void gaudi_handle_qman_err(struct hl_device *hdev, u16 event_type, u64 *e if (event_type == GAUDI_EVENT_MME0_QM) { index = 0; qid_base = GAUDI_QUEUE_ID_MME_0_0; - } else if (event_type == GAUDI_EVENT_MME2_QM) { + } else { /* event_type == GAUDI_EVENT_MME2_QM */ index = 2; qid_base = GAUDI_QUEUE_ID_MME_1_0; }