projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
662167e
)
floppy: add error handling support for add_disk()
author
Luis Chamberlain
<mcgrof@kernel.org>
Mon, 27 Sep 2021 22:02:53 +0000
(15:02 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 18 Oct 2021 20:41:37 +0000
(14:41 -0600)
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>
Link:
https://lore.kernel.org/r/20210927220302.1073499-6-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/floppy.c
patch
|
blob
|
history
diff --git
a/drivers/block/floppy.c
b/drivers/block/floppy.c
index acde3cb63ef414ccc748f594196de998ff01d4d3..3873e789478e0b9f73930d1c6bac8306f881ff93 100644
(file)
--- a/
drivers/block/floppy.c
+++ b/
drivers/block/floppy.c
@@
-4697,8
+4697,10
@@
static int __init do_floppy_init(void)
registered[drive] = true;
- device_add_disk(&floppy_device[drive].dev, disks[drive][0],
- NULL);
+ err = device_add_disk(&floppy_device[drive].dev,
+ disks[drive][0], NULL);
+ if (err)
+ goto out_remove_drives;
}
return 0;