mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
637208e74a
commit
4fac63f8a8
1 changed files with 3 additions and 1 deletions
|
@ -962,7 +962,9 @@ static int __init pf_init_unit(struct pf_unit *pf, bool autoprobe, int port,
|
|||
if (pf_probe(pf))
|
||||
goto out_pi_release;
|
||||
|
||||
add_disk(disk);
|
||||
ret = add_disk(disk);
|
||||
if (ret)
|
||||
goto out_pi_release;
|
||||
pf->present = 1;
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue