habanalabs: avoid using uninitialized pointer
authorOhad Sharabi <osharabi@habana.ai>
Mon, 3 May 2021 06:44:22 +0000 (09:44 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:39 +0000 (15:23 +0300)
commitea7d5e7b102bf0bd41eef1faa6b2337e45791a62
treebea01cdd8ec39d8da1e826a79f30ec07bdd6ecd4
parent6542c3541d0f9405626faff9509aa28671fc3804
habanalabs: avoid using uninitialized pointer

When attempting to read FW component's version we should break if input
FW component is invalid in order to avoid using uninitialized
destination pointer.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/firmware_if.c