From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH 2/13] md/multipath: Improve another size determination in multipath_run() Date: Sun, 2 Oct 2016 13:57:45 +0200 Message-ID: References: <566ABCD9.1060404@users.sourceforge.net> <4a31d7a7-f70c-12f7-202f-963bd8706066@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4a31d7a7-f70c-12f7-202f-963bd8706066@users.sourceforge.net> Sender: kernel-janitors-owner@vger.kernel.org To: linux-raid@vger.kernel.org, Jens Axboe , NeilBrown , Shaohua Li Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall List-Id: linux-raid.ids From: Markus Elfring Date: Sat, 1 Oct 2016 20:52:57 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring --- drivers/md/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index bd53451..7fdabb1 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -399,7 +399,7 @@ static int multipath_run (struct mddev *mddev) * should be freed in multipath_free()] */ - conf = kzalloc(sizeof(struct mpconf), GFP_KERNEL); + conf = kzalloc(sizeof(*conf), GFP_KERNEL); mddev->private = conf; if (!conf) { printk(KERN_ERR -- 2.10.0