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

Chen Ni posted 1 patch 1 year, 7 months ago
ipc/mqueue.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] ipc: mqueue: remove assignment from IS_ERR argument
Posted by Chen Ni 1 year, 7 months ago
Remove assignment from IS_ERR() argument.
This is detected by coccinelle.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 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
Re: [PATCH] ipc: mqueue: remove assignment from IS_ERR argument
Posted by Christian Brauner 1 year, 7 months ago
On Mon, 08 Jul 2024 16:04:04 +0800, Chen Ni wrote:
> Remove assignment from IS_ERR() argument.
> This is detected by coccinelle.
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] ipc: mqueue: remove assignment from IS_ERR argument
      https://git.kernel.org/vfs/vfs/c/b80cc4df1124