Skip to content

Commit

Permalink
mg_disk: fix error path in mg_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jens Axboe committed Jun 28, 2016
1 parent 1b57e66 commit 9e2d23f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/mg_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ static int mg_probe(struct platform_device *plat_dev)
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);
Expand Down

0 comments on commit 9e2d23f

Please sign in to comment.