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>
This commit is contained in:
parent
c3e6d407c0
commit
24996edce5
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue