diff options
author | Jens Axboe <axboe@kernel.dk> | 2025-01-16 14:42:37 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-16 14:42:37 -0700 |
commit | 63492a2d7e2826f94e524e551b1abb3b32c55bca (patch) | |
tree | 8f83b6815beea7440fc1bc58b5f5376cd2d63d4c | |
parent | 3d9a9e9a77c5ebecda43b514f2b9659644b904d0 (diff) | |
parent | 62c552070a980363d55a6082b432ebd1cade7a6e (diff) |
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()
-rw-r--r-- | drivers/md/md-linear.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c index 53bc3fda9edb..a382929ce7ba 100644 --- a/drivers/md/md-linear.c +++ b/drivers/md/md-linear.c @@ -204,8 +204,8 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev) rdev->saved_raid_disk = -1; newconf = linear_conf(mddev, mddev->raid_disks + 1); - if (!newconf) - return -ENOMEM; + if (IS_ERR(newconf)) + return PTR_ERR(newconf); /* newconf->raid_disks already keeps a copy of * the increased * value of mddev->raid_disks, WARN_ONCE() is just used to make |