Skip to contentSkip to conversation

mvsas: missing goto statement

PATCH New Dan Carpenter 1 participant 1 message Aug 11, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

drivers/scsi/mvsas/mv_sas.c +1 -0
index adedaa9..406246c 100644
@@ -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;