mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
dm ioctl: fix error return code in target_message
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>
This commit is contained in:
parent
e8dc79d1bd
commit
4d7659bfbe
@ -1600,6 +1600,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
|
|||||||
|
|
||||||
if (!argc) {
|
if (!argc) {
|
||||||
DMWARN("Empty message received.");
|
DMWARN("Empty message received.");
|
||||||
|
r = -EINVAL;
|
||||||
goto out_argv;
|
goto out_argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user