hpsa: set the enclosure identifier to zero
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 14 Apr 2016 09:37:44 +0000 (12:37 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2016 02:00:58 +0000 (22:00 -0400)
This has only called from show_sas_rphy_enclosure_identifier().  The
caller expects that we set an identifier, otherwise it uses an
uninitialized variable.

[mkp: fixed typo]

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 5be944c8b71c4f926dd592c861f80f72661b335a..25aa219ea2d2e7db638613a81331dd7e2f8dcdae 100644 (file)
@@ -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;
 }