Commit 4fac63f8 authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Jens Axboe

pf: 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: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 637208e7
...@@ -962,7 +962,9 @@ static int __init pf_init_unit(struct pf_unit *pf, bool autoprobe, int port, ...@@ -962,7 +962,9 @@ static int __init pf_init_unit(struct pf_unit *pf, bool autoprobe, int port,
if (pf_probe(pf)) if (pf_probe(pf))
goto out_pi_release; goto out_pi_release;
add_disk(disk); ret = add_disk(disk);
if (ret)
goto out_pi_release;
pf->present = 1; pf->present = 1;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment