aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-09-04 13:37:51 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:45:10 -0400
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 349966f6fc52..9fa0a908607b 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)
52{ 52{
53 struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev); 53 struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
54 54
55 dev_set_drvdata(&scmdev->dev, NULL);
56 scm_blk_dev_cleanup(bdev); 55 scm_blk_dev_cleanup(bdev);
56 dev_set_drvdata(&scmdev->dev, NULL);
57 kfree(bdev); 57 kfree(bdev);
58 58
59 return 0; 59 return 0;