The compiler gets rather upset if we do not take care of this.
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
- get_dev_sector_size(dfd, NULL, &s->sector_size);
+ if (!get_dev_sector_size(dfd, NULL, &s->sector_size)) {
+ err = 2;
+ goto error;
+ }
find_intel_hba_capability(dfd, s, devname);
err = load_and_parse_mpb(dfd, s, NULL, keep_fd);
find_intel_hba_capability(dfd, s, devname);
err = load_and_parse_mpb(dfd, s, NULL, keep_fd);
free_super_imsm(st);
super = alloc_super();
free_super_imsm(st);
super = alloc_super();
- get_dev_sector_size(fd, NULL, &super->sector_size);
+ if (!get_dev_sector_size(fd, NULL, &super->sector_size))
+ return 1;
if (!super)
return 1;
/* Load hba and capabilities if they exist.
if (!super)
return 1;
/* Load hba and capabilities if they exist.
}
get_dev_size(fd, NULL, &size);
}
get_dev_size(fd, NULL, &size);
- get_dev_sector_size(fd, NULL, &member_sector_size);
+ if (!get_dev_sector_size(fd, NULL, &member_sector_size))
+ return 1;
if (super->sector_size == 0) {
/* this a first device, so sector_size is not set yet */
if (super->sector_size == 0) {
/* this a first device, so sector_size is not set yet */
unsigned long long sectors;
unsigned int sector_size;
unsigned long long sectors;
unsigned int sector_size;
- get_dev_sector_size(fd, NULL, §or_size);
+ if (!get_dev_sector_size(fd, NULL, §or_size))
+ return 1;
get_dev_size(fd, NULL, &dsize);
if (mpb_size > sector_size) {
get_dev_size(fd, NULL, &dsize);
if (mpb_size > sector_size) {