From: Stephen Rothwell This patch just makes sure that we do not dereference a viodasd gendisk pointer after it has been freed. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton --- 25-akpm/drivers/block/viodasd.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/block/viodasd.c~ppc64-iseries-fix-viodasd-remove drivers/block/viodasd.c --- 25/drivers/block/viodasd.c~ppc64-iseries-fix-viodasd-remove 2004-11-15 22:14:30.272137232 -0800 +++ 25-akpm/drivers/block/viodasd.c 2004-11-15 22:14:30.276136624 -0800 @@ -764,8 +764,8 @@ static int viodasd_remove(struct vio_dev d = &viodasd_devices[vdev->unit_address]; if (d->disk) { del_gendisk(d->disk); - put_disk(d->disk); blk_cleanup_queue(d->disk->queue); + put_disk(d->disk); d->disk = NULL; } d->dev = NULL; _