aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
authorSwen Schillig <swen.schillig@freenet.de>2007-02-09 04:00:14 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-02-10 14:13:29 -0500
commitca880cf93361e752d2e0bf6bf73657e2c56a0822 (patch)
treeb50dd219044002529a5410b0c7110b073c4004bf /drivers/s390/scsi
parent6fcc47111ae14f284007e1b9a5002babb01d913c (diff)
[SCSI] zfcp: use of uninitialized variable
commit 988d955c3314336d716a9208f3d565b06f262e07 Author: Swen Schillig <swen@vnet.ibm.com> Date: Fri Feb 9 09:40:11 2007 +0100 Use of uninitialized variable. ERP action might not be finished accordingly. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index c88babce9bca..9d3c4a9ba90c 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -841,29 +841,27 @@ zfcp_erp_action_exists(struct zfcp_erp_action *erp_action)
841 * 841 *
842 * returns: 0 842 * returns: 0
843 */ 843 */
844static int 844static void
845zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) 845zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
846{ 846{
847 int retval = 0;
848 struct zfcp_fsf_req *fsf_req = NULL;
849 struct zfcp_adapter *adapter = erp_action->adapter; 847 struct zfcp_adapter *adapter = erp_action->adapter;
850 848
851 if (erp_action->fsf_req) { 849 if (erp_action->fsf_req) {
852 /* take lock to ensure that request is not deleted meanwhile */ 850 /* take lock to ensure that request is not deleted meanwhile */
853 spin_lock(&adapter->req_list_lock); 851 spin_lock(&adapter->req_list_lock);
854 if ((!zfcp_reqlist_ismember(adapter, 852 if (zfcp_reqlist_ismember(adapter,
855 erp_action->fsf_req->req_id)) && 853 erp_action->fsf_req->req_id)) {
856 (fsf_req->erp_action == erp_action)) {
857 /* fsf_req still exists */ 854 /* fsf_req still exists */
858 debug_text_event(adapter->erp_dbf, 3, "a_ca_req"); 855 debug_text_event(adapter->erp_dbf, 3, "a_ca_req");
859 debug_event(adapter->erp_dbf, 3, &fsf_req, 856 debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req,
860 sizeof (unsigned long)); 857 sizeof (unsigned long));
861 /* dismiss fsf_req of timed out/dismissed erp_action */ 858 /* dismiss fsf_req of timed out/dismissed erp_action */
862 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | 859 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED |
863 ZFCP_STATUS_ERP_TIMEDOUT)) { 860 ZFCP_STATUS_ERP_TIMEDOUT)) {
864 debug_text_event(adapter->erp_dbf, 3, 861 debug_text_event(adapter->erp_dbf, 3,
865 "a_ca_disreq"); 862 "a_ca_disreq");
866 fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; 863 erp_action->fsf_req->status |=
864 ZFCP_STATUS_FSFREQ_DISMISSED;
867 } 865 }
868 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { 866 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) {
869 ZFCP_LOG_NORMAL("error: erp step timed out " 867 ZFCP_LOG_NORMAL("error: erp step timed out "
@@ -876,11 +874,11 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
876 * then keep it running asynchronously and don't mess 874 * then keep it running asynchronously and don't mess
877 * with the association of erp_action and fsf_req. 875 * with the association of erp_action and fsf_req.
878 */ 876 */
879 if (fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED | 877 if (erp_action->fsf_req->status &
878 (ZFCP_STATUS_FSFREQ_COMPLETED |
880 ZFCP_STATUS_FSFREQ_DISMISSED)) { 879 ZFCP_STATUS_FSFREQ_DISMISSED)) {
881 /* forget about association between fsf_req 880 /* forget about association between fsf_req
882 and erp_action */ 881 and erp_action */
883 fsf_req->erp_action = NULL;
884 erp_action->fsf_req = NULL; 882 erp_action->fsf_req = NULL;
885 } 883 }
886 } else { 884 } else {
@@ -894,8 +892,6 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
894 spin_unlock(&adapter->req_list_lock); 892 spin_unlock(&adapter->req_list_lock);
895 } else 893 } else
896 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); 894 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq");
897
898 return retval;
899} 895}
900 896
901/** 897/**