linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mg_disk: fix error path in mg_probe()
@ 2016-06-28 13:42 Bartlomiej Zolnierkiewicz
  2016-06-28 17:01 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2016-06-28 13:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: unsik Kim, linux-block, linux-kernel, b.zolnierkie

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>
---
 drivers/block/mg_disk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 1ee3918..e937fcf7 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mg_disk: fix error path in mg_probe()
  2016-06-28 13:42 [PATCH] mg_disk: fix error path in mg_probe() Bartlomiej Zolnierkiewicz
@ 2016-06-28 17:01 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2016-06-28 17:01 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: unsik Kim, linux-block, linux-kernel

On 06/28/2016 07:42 AM, Bartlomiej Zolnierkiewicz wrote:
> 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.

Added, thanks Bart.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-28 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28 13:42 [PATCH] mg_disk: fix error path in mg_probe() Bartlomiej Zolnierkiewicz
2016-06-28 17:01 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).