diff options
author | Marco Pagani <marpagan@redhat.com> | 2022-11-16 14:41:25 +0100 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-11-23 16:13:48 +0200 |
commit | 5908560a7f14171d1100f4a357deda659dc26868 (patch) | |
tree | 06923bfcdfbfd68575391e5f776c3512bf18a709 /drivers/misc | |
parent | 01907ba5252164ca6bf0de670660cd94d77c378c (diff) | |
download | linux-stable-5908560a7f14171d1100f4a357deda659dc26868.tar.gz linux-stable-5908560a7f14171d1100f4a357deda659dc26868.tar.bz2 linux-stable-5908560a7f14171d1100f4a357deda659dc26868.zip |
habanalabs: added return value check for hl_fw_dynamic_send_clear_cmd()
The clang-analyzer reported a warning: "Value stored to 'rc' is never
read".
The return value check for the first hl_fw_dynamic_send_clear_cmd() call
in hl_fw_dynamic_send_protocol_cmd() appears to be missing.
Signed-off-by: Marco Pagani <marpagan@redhat.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/firmware_if.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/firmware_if.c b/drivers/misc/habanalabs/common/firmware_if.c index 01c4ffba6e97..c0909d76d6eb 100644 --- a/drivers/misc/habanalabs/common/firmware_if.c +++ b/drivers/misc/habanalabs/common/firmware_if.c @@ -1783,6 +1783,8 @@ int hl_fw_dynamic_send_protocol_cmd(struct hl_device *hdev, /* first send clear command to clean former commands */ rc = hl_fw_dynamic_send_clear_cmd(hdev, fw_loader); + if (rc) + return rc; /* send the actual command */ hl_fw_dynamic_send_cmd(hdev, fw_loader, cmd, size); |