diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2020-09-29 21:24:17 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-10-07 07:56:16 +0200 |
commit | 1401fcc4e3da97c44dcc7cbf538c07e24768d791 (patch) | |
tree | 6ff578812f352c2567d3c9c261ddcbe7f6020695 /net/lapb/lapb_subr.c | |
parent | 103fbf8e4020845e4fcf63819288cedb092a3c91 (diff) |
nvme-loop: don't put ctrl on nvme_init_ctrl error
The function nvme_init_ctrl() gets the ctrl reference & when it fails it
does put the ctrl reference in the error unwind code.
When creating loop ctrl in nvme_loop_create_ctrl() if nvme_init_ctrl()
returns non zero (i.e. error) value it jumps to the "out_put_ctrl" label
which calls nvme_put_ctrl(), that will lead to douple ctrl put in error
unwind path.
Update nvme_loop_create_ctrl() such that this patch removes the
"out_put_ctrl" label, add a new "out" label after nvme_put_ctrl() in
error unwind path and jump to newly added label when nvme_init_ctrl()
call retuns an error.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions