diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-13 13:57:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-13 13:57:48 +0000 |
commit | 88ba137fe8f55ea98a498a297f4512b3859181c1 (patch) | |
tree | a98587c13cb6139ac2335756d2d50a997206eaec /super-intel.c | |
parent | Adding upstream version 4.2+20230302. (diff) | |
download | mdadm-88ba137fe8f55ea98a498a297f4512b3859181c1.tar.xz mdadm-88ba137fe8f55ea98a498a297f4512b3859181c1.zip |
Adding upstream version 4.2+20230304.upstream/4.2+20230304
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | super-intel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/super-intel.c b/super-intel.c index 89fac62..e155a8a 100644 --- a/super-intel.c +++ b/super-intel.c @@ -713,12 +713,12 @@ static struct sys_dev* find_disk_attached_hba(int fd, const char *devname) for (elem = list; elem; elem = elem->next) if (path_attached_to_hba(disk_path, elem->path)) - return elem; + break; if (disk_path != devname) free(disk_path); - return NULL; + return elem; } static int find_intel_hba_capability(int fd, struct intel_super *super, @@ -4515,6 +4515,7 @@ static int load_imsm_mpb(int fd, struct intel_super *super, char *devname) MIGR_REC_BUF_SECTORS*MAX_SECTOR_SIZE) != 0) { pr_err("could not allocate migr_rec buffer\n"); free(super->buf); + super->buf = NULL; return 2; } super->clean_migration_record_by_mdmon = 0; |