diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2006-08-30 14:33:33 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-08-30 14:33:33 +0200 |
commit | 8f61701bdf536c7a80f0f614bac91c7883804c4c (patch) | |
tree | 59cacbdf8dc8e5677556f5c95c1b11a775ff47de /drivers/s390/block/dasd_genhd.c | |
parent | af313e5a4f56b248767d667c3c2436dda767df77 (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.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 4c272b70f41..d163632101d 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; + } } /* |