From b80cc4df1124702c600fd43b784e423a30919204 Mon Sep 17 00:00:00 2001 From: Chen Ni Date: Mon, 8 Jul 2024 16:04:04 +0800 Subject: ipc: mqueue: remove assignment from IS_ERR argument Remove assignment from IS_ERR() argument. This is detected by coccinelle. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20240708080404.3859094-1-nichen@iscas.ac.cn Signed-off-by: Christian Brauner --- ipc/mqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipc') diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 5eea4dc0509e..a7cbd69efbef 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -903,7 +903,8 @@ static int do_mq_open(const char __user *u_name, int oflag, umode_t mode, audit_mq_open(oflag, mode, attr); - if (IS_ERR(name = getname(u_name))) + name = getname(u_name); + if (IS_ERR(name)) return PTR_ERR(name); fd = get_unused_fd_flags(O_CLOEXEC); -- cgit v1.2.3