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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:06 +0000 (07:52 +0200)
commit615bf75c46903a2409e95d8e146d2bb0a81f930c
tree5ca5663b6f8995db59d8ca16180240833be87dd5
parentd2e2e20bbdd3b527e413044deb0677e7aa3892eb
nbd: fix return value in error handling path

[ 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>
drivers/block/nbd.c