diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 9d01b5dca519..7f480c6b1981 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2475,8 +2475,8 @@ static int mmc_rpmb_chrdev_release(struct inode *inode, struct file *filp) struct mmc_rpmb_data *rpmb = container_of(inode->i_cdev, struct mmc_rpmb_data, chrdev); - put_device(&rpmb->dev); mmc_blk_put(rpmb->md); + put_device(&rpmb->dev); return 0; }