aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2024-02-20 11:56:10 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-02-23 12:43:53 +0100
commite44d13f466e30c018887cd5aaf1212ed9f510813 (patch)
tree614f920a24e80e8c4c9ae804767113e1c5f68081
parentb7d7837128e90c8b496ebc3d88eda1a8ff477392 (diff)
downloadmdadm-test-e44d13f466e30c018887cd5aaf1212ed9f510813.tar.gz
Grow: remove dead condition in Grow_reshape()
Remove dead "if" condition from Grow_reshape(). Sysfs read check is performed earlier in the code. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
-rw-r--r--Grow.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Grow.c b/Grow.c
index 5498e54f..c69a342d 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2098,11 +2098,7 @@ int Grow_reshape(char *devname, int fd,
/* got truncated to 32bit, write to
* component_size instead
*/
- if (sra)
- rv = sysfs_set_num(sra, NULL,
- "component_size", s->size);
- else
- rv = -1;
+ rv = sysfs_set_num(sra, NULL, "component_size", s->size);
} else {
rv = md_set_array_info(fd, &array);