mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-07-08 18:13:59 +02:00
aoe: add error handling support for add_disk()
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
e1654f413f
commit
d9c2bd252a
@@ -417,7 +417,9 @@ aoeblk_gdalloc(void *vp)
|
||||
|
||||
spin_unlock_irqrestore(&d->lock, flags);
|
||||
|
||||
device_add_disk(NULL, gd, aoe_attr_groups);
|
||||
err = device_add_disk(NULL, gd, aoe_attr_groups);
|
||||
if (err)
|
||||
goto out_disk_cleanup;
|
||||
aoedisk_add_debugfs(d);
|
||||
|
||||
spin_lock_irqsave(&d->lock, flags);
|
||||
@@ -426,6 +428,8 @@ aoeblk_gdalloc(void *vp)
|
||||
spin_unlock_irqrestore(&d->lock, flags);
|
||||
return;
|
||||
|
||||
out_disk_cleanup:
|
||||
blk_cleanup_disk(gd);
|
||||
err_tagset:
|
||||
blk_mq_free_tag_set(set);
|
||||
err_mempool:
|
||||
|
||||
Reference in New Issue
Block a user