summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-09-04 19:37:51 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 15:45:10 +0200
commit24996edce547fd981c089db9a12717fd76a51160 (patch)
tree3ee78f90357eb119b4731a5d88a80f7bbc54b282 /drivers/s390
parentc3e6d407c0c09fb46a391bdd0a28827472825de7 (diff)
s390/scm: reorder scm_remove
Do not reset drvdata before the block device is cleaned up. With a non-empty block queue drvdata could be accessed. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/scm_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/block/scm_drv.c b/drivers/s390/block/scm_drv.c
index 349966f6fc5..9fa0a908607 100644
--- a/drivers/s390/block/scm_drv.c
+++ b/drivers/s390/block/scm_drv.c
@@ -52,8 +52,8 @@ static int scm_remove(struct scm_device *scmdev)
{
struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
- dev_set_drvdata(&scmdev->dev, NULL);
scm_blk_dev_cleanup(bdev);
+ dev_set_drvdata(&scmdev->dev, NULL);
kfree(bdev);
return 0;