habanalabs: fix return value check in hl_fw_get_sec_attest_data()
If hl_cpu_accessible_dma_pool_alloc() fails, we should check
'req_cpu_addr', fix it.
Fixes: 0c88760f8f
("habanalabs/gaudi2: add secured attestation info uapi")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
Родитель
210a671cc3
Коммит
8749c27895
|
@ -2983,7 +2983,7 @@ static int hl_fw_get_sec_attest_data(struct hl_device *hdev, u32 packet_id, void
|
|||
int rc;
|
||||
|
||||
req_cpu_addr = hl_cpu_accessible_dma_pool_alloc(hdev, size, &req_dma_addr);
|
||||
if (!data) {
|
||||
if (!req_cpu_addr) {
|
||||
dev_err(hdev->dev,
|
||||
"Failed to allocate DMA memory for CPU-CP packet %u\n", packet_id);
|
||||
return -ENOMEM;
|
||||
|
|
Загрузка…
Ссылка в новой задаче