]> git.baikalelectronics.ru Git - kernel.git/commit
ataflop: fix error handling during setup
authorOmar Sandoval <osandov@fb.com>
Thu, 11 Oct 2018 19:20:49 +0000 (12:20 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Oct 2018 15:50:03 +0000 (09:50 -0600)
commitb2c09ee03e89196f76665e237c79077e6ed15ba3
tree6c887980b26407e736d4275da318affba46ff372
parentad412b67d2642f04f9264dc2c7499798808f409c
ataflop: fix error handling during setup

Move queue allocation next to disk allocation to fix a couple of issues:

- If add_disk() hasn't been called, we should clear disk->queue before
  calling put_disk().
- If we fail to allocate a request queue, we still need to put all of
  the disks, not just the ones that we allocated queues for.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ataflop.c