提交 546e559c 编写于 作者: M Maurizio Lombardi 提交者: Martin K. Petersen

megaraid: fix null pointer check in megasas_detach_one().

The pd_seq_sync pointer can't be NULL, we have to check its entries
instead.
Signed-off-by: NMaurizio Lombardi <mlombard@redhat.com>
Acked-by: NSumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: NTomas Henzl <thenzl@redhat.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 33f8d1f0
......@@ -6294,11 +6294,11 @@ static void megasas_detach_one(struct pci_dev *pdev)
if (fusion->ld_drv_map[i])
free_pages((ulong)fusion->ld_drv_map[i],
fusion->drv_map_pages);
if (fusion->pd_seq_sync)
dma_free_coherent(&instance->pdev->dev,
pd_seq_map_sz,
fusion->pd_seq_sync[i],
fusion->pd_seq_phys[i]);
if (fusion->pd_seq_sync[i])
dma_free_coherent(&instance->pdev->dev,
pd_seq_map_sz,
fusion->pd_seq_sync[i],
fusion->pd_seq_phys[i]);
}
free_pages((ulong)instance->ctrl_context,
instance->ctrl_context_pages);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册