aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001
diff options
context:
space:
mode:
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>2014-07-09 07:50:10 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:17:05 -0400
commitda225498d97565b6f25ed28ebdf0fecdf3a5ca5c (patch)
tree7d719f138e27b29fbca94432896b43891ff37991 /drivers/scsi/pm8001
parentd98164461c885ef2655d8edceec4f8f403c0b41e (diff)
pm8001: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppche Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Acked-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Acked-by: Jack Wang <xjtuwjp@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/pm8001')
-rw-r--r--drivers/scsi/pm8001/pm80xx_hwi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index c711a769d23e..b06443a0db2d 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -952,7 +952,7 @@ static int
952pm80xx_get_encrypt_info(struct pm8001_hba_info *pm8001_ha) 952pm80xx_get_encrypt_info(struct pm8001_hba_info *pm8001_ha)
953{ 953{
954 u32 scratch3_value; 954 u32 scratch3_value;
955 int ret; 955 int ret = -1;
956 956
957 /* Read encryption status from SCRATCH PAD 3 */ 957 /* Read encryption status from SCRATCH PAD 3 */
958 scratch3_value = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_3); 958 scratch3_value = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_3);
@@ -986,7 +986,7 @@ pm80xx_get_encrypt_info(struct pm8001_hba_info *pm8001_ha)
986 pm8001_ha->encrypt_info.status = 0xFFFFFFFF; 986 pm8001_ha->encrypt_info.status = 0xFFFFFFFF;
987 pm8001_ha->encrypt_info.cipher_mode = 0; 987 pm8001_ha->encrypt_info.cipher_mode = 0;
988 pm8001_ha->encrypt_info.sec_mode = 0; 988 pm8001_ha->encrypt_info.sec_mode = 0;
989 return 0; 989 ret = 0;
990 } else if ((scratch3_value & SCRATCH_PAD3_ENC_MASK) == 990 } else if ((scratch3_value & SCRATCH_PAD3_ENC_MASK) ==
991 SCRATCH_PAD3_ENC_DIS_ERR) { 991 SCRATCH_PAD3_ENC_DIS_ERR) {
992 pm8001_ha->encrypt_info.status = 992 pm8001_ha->encrypt_info.status =
@@ -1008,7 +1008,6 @@ pm80xx_get_encrypt_info(struct pm8001_hba_info *pm8001_ha)
1008 scratch3_value, pm8001_ha->encrypt_info.cipher_mode, 1008 scratch3_value, pm8001_ha->encrypt_info.cipher_mode,
1009 pm8001_ha->encrypt_info.sec_mode, 1009 pm8001_ha->encrypt_info.sec_mode,
1010 pm8001_ha->encrypt_info.status)); 1010 pm8001_ha->encrypt_info.status));
1011 ret = -1;
1012 } else if ((scratch3_value & SCRATCH_PAD3_ENC_MASK) == 1011 } else if ((scratch3_value & SCRATCH_PAD3_ENC_MASK) ==
1013 SCRATCH_PAD3_ENC_ENA_ERR) { 1012 SCRATCH_PAD3_ENC_ENA_ERR) {
1014 1013
@@ -1032,7 +1031,6 @@ pm80xx_get_encrypt_info(struct pm8001_hba_info *pm8001_ha)
1032 scratch3_value, pm8001_ha->encrypt_info.cipher_mode, 1031 scratch3_value, pm8001_ha->encrypt_info.cipher_mode,
1033 pm8001_ha->encrypt_info.sec_mode, 1032 pm8001_ha->encrypt_info.sec_mode,
1034 pm8001_ha->encrypt_info.status)); 1033 pm8001_ha->encrypt_info.status));
1035 ret = -1;
1036 } 1034 }
1037 return ret; 1035 return ret;
1038} 1036}