>From 347191384292c6e9a9a572c657049bc11615fb82 Mon Sep 17 00:00:00 2001 From: Andy <ayan@xxxxxxxxxxx> Date: Mon, 4 May 2009 23:29:26 +0800 Subject: [PATCH 1/4] mvsas: bug fix, null pointer may be used Null pointer exception when mvi_dev is null. Signed-off-by: Ying Chu <jasonchu@xxxxxxxxxxx> Signed-off-by: Andy Yan <ayan@xxxxxxxxxxx> Signed-off-by: Ke Wei <kewei@xxxxxxxxxxx> --- drivers/scsi/mvsas/mv_sas.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index d79ac17..318ec01 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -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; -- 1.6.0.3 -- Regards, Ying Chu -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html