[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100811073826.GA30429@bicker>
Date: Wed, 11 Aug 2010 09:38:27 +0200
From: Dan Carpenter <error27@...il.com>
To: "James E.J. Bottomley" <James.Bottomley@...e.de>
Cc: Jiri Slaby <jslaby@...e.cz>, Srinivas <satyasrinivasp@....in>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch 1/2] mvsas: missing goto statement
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@...il.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists