Skip to content

Commit 63492a2

Browse files
committed
Merge tag 'md-6.14-20250116' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-6.14/block
Pull MD fix from Song. * tag 'md-6.14-20250116' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md/md-linear: Fix a NULL vs IS_ERR() bug in linear_add()
2 parents 3d9a9e9 + 62c5520 commit 63492a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/md-linear.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
204204
rdev->saved_raid_disk = -1;
205205

206206
newconf = linear_conf(mddev, mddev->raid_disks + 1);
207-
if (!newconf)
208-
return -ENOMEM;
207+
if (IS_ERR(newconf))
208+
return PTR_ERR(newconf);
209209

210210
/* newconf->raid_disks already keeps a copy of * the increased
211211
* value of mddev->raid_disks, WARN_ONCE() is just used to make

0 commit comments

Comments
 (0)