diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_ccw.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index ef5282dcdbb..95644b71836 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -192,13 +192,9 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device) | |||
192 | 192 | ||
193 | mutex_lock(&zfcp_data.config_mutex); | 193 | mutex_lock(&zfcp_data.config_mutex); |
194 | adapter = dev_get_drvdata(&ccw_device->dev); | 194 | adapter = dev_get_drvdata(&ccw_device->dev); |
195 | if (!adapter) | ||
196 | goto out; | ||
197 | |||
198 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL); | 195 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL); |
199 | zfcp_erp_wait(adapter); | 196 | zfcp_erp_wait(adapter); |
200 | mutex_unlock(&zfcp_data.config_mutex); | 197 | mutex_unlock(&zfcp_data.config_mutex); |
201 | out: | ||
202 | return 0; | 198 | return 0; |
203 | } | 199 | } |
204 | 200 | ||
@@ -253,9 +249,13 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev) | |||
253 | 249 | ||
254 | mutex_lock(&zfcp_data.config_mutex); | 250 | mutex_lock(&zfcp_data.config_mutex); |
255 | adapter = dev_get_drvdata(&cdev->dev); | 251 | adapter = dev_get_drvdata(&cdev->dev); |
252 | if (!adapter) | ||
253 | goto out; | ||
254 | |||
256 | zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL); | 255 | zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL); |
257 | zfcp_erp_wait(adapter); | 256 | zfcp_erp_wait(adapter); |
258 | zfcp_erp_thread_kill(adapter); | 257 | zfcp_erp_thread_kill(adapter); |
258 | out: | ||
259 | mutex_unlock(&zfcp_data.config_mutex); | 259 | mutex_unlock(&zfcp_data.config_mutex); |
260 | } | 260 | } |
261 | 261 | ||