Manage: Remove unnecessary NULL pointer checks
sysfs_free() handles NULL pointers, so remove superfluous NULL pointer checks before calling it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
parent
21f541cc31
commit
6e8d27e77e
3
Manage.c
3
Manage.c
|
@ -119,7 +119,6 @@ int Manage_ro(char *devname, int fd, int readonly)
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
#ifndef MDASSEMBLE
|
#ifndef MDASSEMBLE
|
||||||
if (mdi)
|
|
||||||
sysfs_free(mdi);
|
sysfs_free(mdi);
|
||||||
#endif
|
#endif
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -516,7 +515,6 @@ done:
|
||||||
map_remove(&map, devnm);
|
map_remove(&map, devnm);
|
||||||
map_unlock(&map);
|
map_unlock(&map);
|
||||||
out:
|
out:
|
||||||
if (mdi)
|
|
||||||
sysfs_free(mdi);
|
sysfs_free(mdi);
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -1164,7 +1162,6 @@ int Manage_remove(struct supertype *tst, int fd, struct mddev_dev *dv,
|
||||||
"state", "remove");
|
"state", "remove");
|
||||||
else
|
else
|
||||||
err = -1;
|
err = -1;
|
||||||
if (sra)
|
|
||||||
sysfs_free(sra);
|
sysfs_free(sra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue