1
0
Fork 0

dm ioctl: fix error return code in target_message

[ Upstream commit 4d7659bfbe ]

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

Fixes: 2ca4c92f58 ("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>
5.4-rM2-2.2.x-imx-squashed
Qinglang Miao 2020-11-28 18:19:59 +08:00 committed by Greg Kroah-Hartman
parent d863d76536
commit 675b3ba9cc
1 changed files with 1 additions and 0 deletions

View File

@ -1600,6 +1600,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
if (!argc) {
DMWARN("Empty message received.");
r = -EINVAL;
goto out_argv;
}