diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-12-04 08:54:19 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-12-04 08:54:19 -0700 |
commit | b1476451488b32ce594c495122b96fd88489dc7d (patch) | |
tree | a9fc1a7a09f720e5b284269b8d68c4b4997f296c | |
parent | 85d6ce58e493ac8b7122e2fbe3f41b94d6ebdc11 (diff) | |
parent | f8ace2e304c5dd8a7328db9cd2b8a4b1b98d83ec (diff) |
Merge tag 'floppy-for-6.2' of https://github.com/evdenis/linux-floppy into for-6.2/block
Pull floppy fix from Denis:
"Floppy patch for 6.2
The patch from Yuan Can fixes a memory leak in floppy init code.
Signed-off-by: Denis Efremov <efremov@linux.com>"
* tag 'floppy-for-6.2' of https://github.com/evdenis/linux-floppy:
floppy: Fix memory leak in do_floppy_init()
-rw-r--r-- | drivers/block/floppy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index ccad3d7b3ddd..487840e3564d 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4593,8 +4593,10 @@ static int __init do_floppy_init(void) goto out_put_disk; err = floppy_alloc_disk(drive, 0); - if (err) + if (err) { + blk_mq_free_tag_set(&tag_sets[drive]); goto out_put_disk; + } timer_setup(&motor_off_timer[drive], motor_off_callback, 0); } |