dm: fix pointer not checked for null before use

this patch fix null pointer access issues.

Tracked-On: #3434
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
This commit is contained in:
Tianhua Sun
2019-07-17 16:07:36 +08:00
committed by ACRN System Integration
parent d4f44bc7a6
commit 493ddefd47
2 changed files with 7 additions and 2 deletions

View File

@@ -2923,7 +2923,7 @@ retry:
trb->dwTrb2 & 0x1FFFF, (void *)addr,
ccs);
if (trb->dwTrb3 & XHCI_TRB_3_CHAIN_BIT)
if (xfer_block && (trb->dwTrb3 & XHCI_TRB_3_CHAIN_BIT))
xfer_block->chained = 1;
break;