[PATCH] ipc: mqueue: remove assignment from IS_ERR argument

From: Chen Ni
Date: Mon Jul 08 2024 - 04:05:18 EST


Remove assignment from IS_ERR() argument.
This is detected by coccinelle.

Signed-off-by: Chen Ni <nichen@xxxxxxxxxxx>
---
ipc/mqueue.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

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);
--
2.25.1