diff mbox

hpsa: set the enclosure identifier to zero

Message ID 20160414093744.GJ16549@mwanda (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Dan Carpenter April 14, 2016, 9:37 a.m. UTC
This has only called from show_sas_rphy_enclosure_identifier().  The
caller expects that we set an identifier, otherwise it uses an
unintialized variable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Martin K. Petersen April 26, 2016, 2:02 a.m. UTC | #1
>>>>> "Dan" == Dan Carpenter <dan.carpenter@oracle.com> writes:

Dan> This has only called from show_sas_rphy_enclosure_identifier().
Dan> The caller expects that we set an identifier, otherwise it uses an
Dan> unintialized variable.

Applied to 4.7/scsi-queue.
diff mbox

Patch

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 5be944c..25aa219 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -9602,6 +9602,7 @@  hpsa_sas_get_linkerrors(struct sas_phy *phy)
 static int
 hpsa_sas_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
 {
+	*identifier = 0;
 	return 0;
 }