[PATCH 4/6] Grow: remove dead condition in Grow_reshape()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove dead "if" condition from Grow_reshape(). Sysfs read check is
performed earlier in the code.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@xxxxxxxxx>
---
 Grow.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Grow.c b/Grow.c
index f95dae82ef0d..dad7294dac32 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2097,11 +2097,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);
 
-- 
2.35.3





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux