xfs: xfs_qm: remove unnecessary ‘0’ values from error

Message ID 20221223081114.3959-1-zeming@nfschina.com
State New
Headers
Series xfs: xfs_qm: remove unnecessary ‘0’ values from error |

Commit Message

Li zeming Dec. 23, 2022, 8:11 a.m. UTC
  error is assigned first, so it does not need to initialize the
assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 fs/xfs/xfs_qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Darrick J. Wong Jan. 3, 2023, 6:07 p.m. UTC | #1
On Fri, Dec 23, 2022 at 04:11:14PM +0800, Li zeming wrote:
> error is assigned first, so it does not need to initialize the
> assignment.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Looks fine to me...
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_qm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index ff53d40a2dae..e2c542f6dcd4 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -68,7 +68,7 @@ xfs_qm_dquot_walk(
>  
>  	while (1) {
>  		struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
> -		int		error = 0;
> +		int		error;
>  		int		i;
>  
>  		mutex_lock(&qi->qi_tree_lock);
> -- 
> 2.18.2
>
  

Patch

diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index ff53d40a2dae..e2c542f6dcd4 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -68,7 +68,7 @@  xfs_qm_dquot_walk(
 
 	while (1) {
 		struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
-		int		error = 0;
+		int		error;
 		int		i;
 
 		mutex_lock(&qi->qi_tree_lock);