* [patch 1/2] mvsas: missing goto statement
@ 2010-08-11 7:38 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-08-11 7:38 UTC (permalink / raw)
To: James E.J. Bottomley
Cc: Jiri Slaby, Srinivas, linux-scsi, linux-kernel, kernel-janitors
If mvi_dev is NULL here, then we're supposed return with an error code
but the "goto out" was missing and it could result in a NULL
dereference.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index adedaa9..406246c 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1648,6 +1648,7 @@ int mvs_abort_task(struct sas_task *task)
if (!mvi_dev) {
mv_printk("%s:%d TMF_RESP_FUNC_FAILED\n", __func__, __LINE__);
rc = TMF_RESP_FUNC_FAILED;
+ goto out;
}
mvi = mvi_dev->mvi_info;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-11 7:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11 7:38 [patch 1/2] mvsas: missing goto statement Dan Carpenter
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).