Skip to content

Commit

Permalink
s390/scm: reorder scm_remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 26, 2012
1 parent c3e6d40 commit 24996ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/block/scm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 24996ed

Please sign in to comment.