提交 0f980a87 编写于 作者: A Andy Yan 提交者: James Bottomley

[SCSI] mvsas: bug fix, null pointer may be used

Null pointer check to avoid corruption.
Signed-off-by: NYing Chu <jasonchu@marvell.com>
Signed-off-by: NAndy Yan <ayan@marvell.com>
Signed-off-by: NKe Wei <kewei@marvell.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 0b84b709
......@@ -1873,11 +1873,11 @@ int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags)
}
out:
if (mvi_dev)
if (mvi_dev) {
mvi_dev->runing_req--;
if (sas_protocol_ata(task->task_proto))
mvs_free_reg_set(mvi, mvi_dev);
if (sas_protocol_ata(task->task_proto))
mvs_free_reg_set(mvi, mvi_dev);
}
mvs_slot_task_free(mvi, task, slot, slot_idx);
sts = tstat->stat;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册