diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-09-28 01:01:56 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 23:41:37 +0300 |
commit | 4fac63f8a871bc2e38dce4944c9d964a62bac3e6 (patch) | |
tree | 51e79a7395830288ea827449dd0f855d75fda1a4 /drivers/block/paride | |
parent | 637208e74a861d993c3a8eea3f9f1df4415930e0 (diff) | |
download | linux-4fac63f8a871bc2e38dce4944c9d964a62bac3e6.tar.xz |
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>
Diffstat (limited to 'drivers/block/paride')
-rw-r--r-- | drivers/block/paride/pf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index f471d48a87bc..380d80e507c7 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -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; |