diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-04-12 13:49:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-12 13:49:28 -0400 |
commit | 8065248069097dddf9945acfb2081025e9618c16 (patch) | |
tree | eddf3fb0372ba0f65c01382d386942ea8d18932d /drivers/md/linear.c | |
parent | e66a8ddff72e85605f2212a0ebc666c7e9116641 (diff) | |
parent | b4838d12e1f3cb48c2489a0b08733b5dbf848297 (diff) | |
download | op-kernel-dev-8065248069097dddf9945acfb2081025e9618c16.zip op-kernel-dev-8065248069097dddf9945acfb2081025e9618c16.tar.gz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index b0fcc7d..fa211d8 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -198,6 +198,7 @@ out: static int linear_run (struct mddev *mddev) { struct linear_conf *conf; + int ret; if (md_check_no_bitmap(mddev)) return -EINVAL; @@ -211,7 +212,13 @@ static int linear_run (struct mddev *mddev) blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); mddev->queue->backing_dev_info.congested_fn = linear_congested; mddev->queue->backing_dev_info.congested_data = mddev; - return md_integrity_register(mddev); + + ret = md_integrity_register(mddev); + if (ret) { + kfree(conf); + mddev->private = NULL; + } + return ret; } static int linear_add(struct mddev *mddev, struct md_rdev *rdev) |