xfs: Initialize error in xfs_attr_remove_iter
PATCH 1/1 xfs: Initialize error in xfs_attr_remove_iter
A recent bug report generated a warning that a code path in xfs_attr_remove_iter could potentially return error uninitialized in the case of XFS_DAS_RM_SHRINK state. Fix this by initializing error.
--- fs/xfs/libxfs/xfs_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_attr.c +1 -1
@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter( {struct xfs_da_args *args = dac->da_args;struct xfs_da_state *state = dac->da_state; -int retval, error; +int retval, error =0 ;struct xfs_inode *dp = args->dp;trace_xfs_attr_node_removename (args);
Signature · 1 line
2.7.4
Quoted 7 lines · Allison Henderson
A recent bug report generated a warning that a code path in
xfs_attr_remove_itercould potentially return error uninitialized in the case ofXFS_DAS_RM_SHRINKstate. Fix this by initializing error.Signed-off-by Allison Henderson <[email protected]>Reported-by Dan Carpenter <[email protected]>---
Quoted 19 lines
fs/xfs/libxfs/xfs_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_attr.c +1
-1@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter( {struct xfs_da_args *args = dac->da_args;struct xfs_da_state *state = dac->da_state; -int retval, error; +int retval, error =0 ;struct xfs_inode *dp = args->dp;trace_xfs_attr_node_removename (args);Signature · 1 line
2.7.4
Quoted 6 lines · Allison Henderson
A recent bug report generated a warning that a code path in
xfs_attr_remove_itercould potentially return error uninitialized in the case ofXFS_DAS_RM_SHRINKstate. Fix this by initializing error.Signed-off-by Allison Henderson <[email protected]>Reported-by Dan Carpenter <[email protected]>
Quoted 20 lines
--- fs/xfs/libxfs/xfs_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_attr.c +1
-1@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter( {struct xfs_da_args *args = dac->da_args;struct xfs_da_state *state = dac->da_state; -int retval, error; +int retval, error =0 ;struct xfs_inode *dp = args->dp;trace_xfs_attr_node_removename (args);Signature · 1 line
2.7.4
Quoted 6 lines · Allison Henderson
A recent bug report generated a warning that a code path in
xfs_attr_remove_itercould potentially return error uninitialized in the case ofXFS_DAS_RM_SHRINKstate. Fix this by initializing error.Signed-off-by Allison Henderson <[email protected]>Reported-by Dan Carpenter <[email protected]>
Looks good,
--D
Quoted 20 lines
--- fs/xfs/libxfs/xfs_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_attr.c +1
-1@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter( {struct xfs_da_args *args = dac->da_args;struct xfs_da_state *state = dac->da_state; -int retval, error; +int retval, error =0 ;struct xfs_inode *dp = args->dp;trace_xfs_attr_node_removename (args);Signature · 1 line
2.7.4