diff mbox series

ocfs2: Simplify return statement in ocfs2_filecheck_attr_store()

Message ID 20250408103408.804253-1-thorsten.blum@linux.dev (mailing list archive)
State New
Headers show
Series ocfs2: Simplify return statement in ocfs2_filecheck_attr_store() | expand

Commit Message

Thorsten Blum April 8, 2025, 10:34 a.m. UTC
Don't negate 'ret' and simplify the return statement.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 fs/ocfs2/filecheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joseph Qi April 12, 2025, 11:49 p.m. UTC | #1
On 2025/4/8 18:34, Thorsten Blum wrote:
> Don't negate 'ret' and simplify the return statement.
> 
> No functional changes intended.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
>  fs/ocfs2/filecheck.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
> index 1ad7106741f8..3ad7baf67658 100644
> --- a/fs/ocfs2/filecheck.c
> +++ b/fs/ocfs2/filecheck.c
> @@ -505,5 +505,5 @@ static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
>  		ocfs2_filecheck_handle_entry(ent, entry);
>  
>  exit:
> -	return (!ret ? count : ret);
> +	return ret ?: count;
>  }
diff mbox series

Patch

diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index 1ad7106741f8..3ad7baf67658 100644
--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -505,5 +505,5 @@  static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
 		ocfs2_filecheck_handle_entry(ent, entry);
 
 exit:
-	return (!ret ? count : ret);
+	return ret ?: count;
 }