mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-27 16:15:54 +08:00
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
@ -52,8 +52,8 @@ static int scm_remove(struct scm_device *scmdev)
|
|||||||
{
|
{
|
||||||
struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
|
struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
|
||||||
|
|
||||||
dev_set_drvdata(&scmdev->dev, NULL);
|
|
||||||
scm_blk_dev_cleanup(bdev);
|
scm_blk_dev_cleanup(bdev);
|
||||||
|
dev_set_drvdata(&scmdev->dev, NULL);
|
||||||
kfree(bdev);
|
kfree(bdev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user