habanalabs: avoid copying pll data if pll_info_get fails
authorTomer Tayar <ttayar@habana.ai>
Wed, 12 Jan 2022 09:00:52 +0000 (11:00 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:02 +0000 (14:22 +0200)
commitca4c8e4e7b57eec403e9887cd8b47d2ff8c97811
treeab4c0cf6f40291ac6015c3b5a9df4512301ac410
parent7169f0dfecf7745c810782f3f5fe22ba2a8d9ba1
habanalabs: avoid copying pll data if pll_info_get fails

If reading PLL info from F/W fails, the PLL info is not set in the
"result" variable, and hence shouldn't be copied to the caller's array.

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