From: Sebastian Ott Date: Tue, 4 Sep 2012 17:37:51 +0000 (+0200) Subject: s390/scm: reorder scm_remove X-Git-Tag: next-20120911~108^2~9 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9c02ef8a658b484d758eeacae429efcd3ac7db26;p=karo-tx-linux.git 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 Signed-off-by: Martin Schwidefsky --- 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) { 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;