summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2016-06-28 15:42:41 +0200
committerJens Axboe <axboe@fb.com>2016-06-28 19:01:27 +0200
commit9e2d23f19ef6e8a08348c8f59f79805c6cb25fe6 (patch)
tree4ff5004f68a8f612c4a84609c54949848ff2ae59 /drivers/block
parentdrbd: correctly handle failed crypto_alloc_hash (diff)
downloadlinux-9e2d23f19ef6e8a08348c8f59f79805c6cb25fe6.tar.xz
linux-9e2d23f19ef6e8a08348c8f59f79805c6cb25fe6.zip
mg_disk: fix error path in mg_probe()
MG_DISK_MAJ is defined as 0 so dynamic block major number allocation is used by the driver and the assigned major number is stored in host->major. This patch fixes error path in mg_probe() to use host->major instead of using MG_DISK_MAJ. Cc: unsik Kim <donari75@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/mg_disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 1ee391846e0b..e937fcf71769 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -1015,7 +1015,7 @@ probe_err_7:
probe_err_6:
blk_cleanup_queue(host->breq);
probe_err_5:
- unregister_blkdev(MG_DISK_MAJ, MG_DISK_NAME);
+ unregister_blkdev(host->major, MG_DISK_NAME);
probe_err_4:
if (!prv_data->use_polling)
free_irq(host->irq, host);