dm ioctl: fix error return code in target_message
authorQinglang Miao <miaoqinglang@huawei.com>
Sat, 28 Nov 2020 10:19:59 +0000 (18:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:46:58 +0000 (13:46 +0100)
commit961b1dff00a0d108e64bcbd2b757d5f00bff5112
tree6cedc2f09466367b62989105f857c35f989d8498
parent1d3b3ff7904e6a37b1cbbe870e8e69a4e801794c
dm ioctl: fix error return code in target_message

[ Upstream commit 4d7659bfbe277a43399a4a2d90fca141e70f29e1 ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 2ca4c92f58f9 ("dm ioctl: prevent empty message")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-ioctl.c