[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb82c166-a267-dbb7-adac-f9d741bbda13@users.sourceforge.net>
Date: Thu, 6 Oct 2016 11:43:39 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-raid@...r.kernel.org, Christoph Hellwig <hch@....de>,
Guoqing Jiang <gqjiang@...e.com>, Jens Axboe <axboe@...com>,
Mike Christie <mchristi@...hat.com>,
Neil Brown <neilb@...e.com>, Shaohua Li <shli@...nel.org>,
Tomasz Majchrzak <tomasz.majchrzak@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 43/54] md/raid10: Return directly after detection of
unsupported settings in setup_conf()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 5 Oct 2016 17:32:49 +0200
* Return directly after unsupported system settings were detected
at the beginning.
* Delete the explicit initialisation for the local variables "conf"
and "err" which became unnecessary with this refactoring.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/md/raid10.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 1f712f7..8326e68 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3478,8 +3478,8 @@ static int setup_geo(struct geom *geo, struct mddev *mddev, enum geo_type new)
static struct r10conf *setup_conf(struct mddev *mddev)
{
- struct r10conf *conf = NULL;
- int err = -EINVAL;
+ struct r10conf *conf;
+ int err;
struct geom geo;
int copies;
@@ -3489,13 +3489,13 @@ static struct r10conf *setup_conf(struct mddev *mddev)
printk(KERN_ERR "md/raid10:%s: chunk size must be "
"at least PAGE_SIZE(%ld) and be a power of 2.\n",
mdname(mddev), PAGE_SIZE);
- goto out;
+ return ERR_PTR(-EINVAL);
}
if (copies < 2 || copies > mddev->raid_disks) {
printk(KERN_ERR "md/raid10:%s: unsupported raid10 layout: 0x%8x\n",
mdname(mddev), mddev->new_layout);
- goto out;
+ return ERR_PTR(-EINVAL);
}
err = -ENOMEM;
--
2.10.1
Powered by blists - more mailing lists