]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nbd: fix return value in error handling path
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 12 Feb 2018 17:14:55 +0000 (11:14 -0600)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commiteb5b6520d80f47de8e203b4ea30336b1150ff791
tree0db65c30b3ba8e3412e4077356263dce2c0adaea
parent95662c228e2eb0ac9c6e549c986865cf7b076fdc
nbd: fix return value in error handling path

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 0979962f5490abe75b3e2befb07a564fa0cf631b ]

It seems that the proper value to return in this particular case is the
one contained into variable new_index instead of ret.

Addresses-Coverity-ID: 1465148 ("Copy-paste error")
Fixes: e46c7287b1c2 ("nbd: add a basic netlink interface")
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/block/nbd.c