* [PATCH 3/5] bug fix: Null pointer may be used
@ 2009-05-11 16:59 Andy Yan
0 siblings, 0 replies; only message in thread
From: Andy Yan @ 2009-05-11 16:59 UTC (permalink / raw)
To: linux-scsi; +Cc: james.bottomley, jeff
>From d4529158b4e32d68b41a052c9b66de7243e0c4ce Mon Sep 17 00:00:00 2001
From: Andy Yan <ayan@marvell.com>
Date: Mon, 11 May 2009 21:49:52 +0800
Subject: [PATCH 3/5] bug fix: Null pointer may be used
Null pointer check to avoid corruption.
Signed-off-by: Ying Chu <jasonchu@marvell.com>
Signed-off-by: Andy Yan <ayan@marvell.com>
Signed-off-by: Ke Wei <kewei@marvell.com>
---
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 4279b5e..3fc396f 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.2.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-11 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-11 16:59 [PATCH 3/5] bug fix: Null pointer may be used Andy Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).