diff options
author | Chen Ni <nichen@iscas.ac.cn> | 2024-07-08 16:04:04 +0800 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-07-09 06:47:40 +0200 |
commit | b80cc4df1124702c600fd43b784e423a30919204 (patch) | |
tree | c48f94c452c69c850134cf1595f0a61be32b28a5 /ipc/mqueue.c | |
parent | f378ec4eec8b7e607dbc0112913fd3d5d84eb1b8 (diff) | |
download | lwn-b80cc4df1124702c600fd43b784e423a30919204.tar.gz lwn-b80cc4df1124702c600fd43b784e423a30919204.zip |
ipc: mqueue: remove assignment from IS_ERR argument
Remove assignment from IS_ERR() argument.
This is detected by coccinelle.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20240708080404.3859094-1-nichen@iscas.ac.cn
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r-- | ipc/mqueue.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |