summaryrefslogtreecommitdiff
path: root/drivers/s390/block/dasd_genhd.c
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2006-08-30 14:33:33 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-08-30 14:33:33 +0200
commit8f61701bdf536c7a80f0f614bac91c7883804c4c (patch)
tree59cacbdf8dc8e5677556f5c95c1b11a775ff47de /drivers/s390/block/dasd_genhd.c
parentaf313e5a4f56b248767d667c3c2436dda767df77 (diff)
[S390] dasd: fix device shutdown process.
Fix clear_IO handling (need to wait for interrupt) and introduced error-handling in shutdown processing. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_genhd.c')
-rw-r--r--drivers/s390/block/dasd_genhd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 4c272b70f41a..d163632101d2 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -83,10 +83,12 @@ dasd_gendisk_alloc(struct dasd_device *device)
void
dasd_gendisk_free(struct dasd_device *device)
{
- del_gendisk(device->gdp);
- device->gdp->queue = NULL;
- put_disk(device->gdp);
- device->gdp = NULL;
+ if (device->gdp) {
+ del_gendisk(device->gdp);
+ device->gdp->queue = NULL;
+ put_disk(device->gdp);
+ device->gdp = NULL;
+ }
}
/*