From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH 2/5] ISDN-Gigaset: Improve another size determination in gigaset_initcs() Date: Mon, 26 Sep 2016 17:40:04 +0200 Message-ID: References: <566ABCD9.1060404@users.sourceforge.net> <6d4bbb77-914f-19b8-a1a9-2731d1158612@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall To: gigaset307x-common@lists.sourceforge.net, netdev@vger.kernel.org, Karsten Keil , Paul Bolle Return-path: In-Reply-To: <6d4bbb77-914f-19b8-a1a9-2731d1158612@users.sourceforge.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Markus Elfring Date: Sun, 25 Sep 2016 22:32:14 +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 according to the Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/isdn/gigaset/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index cecbb6a..f505b42 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -710,7 +710,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, cs->mode = M_UNKNOWN; cs->mstate = MS_UNINITIALIZED; cs->bcs = kmalloc_array(channels, sizeof(*cs->bcs), GFP_KERNEL); - cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL); + cs->inbuf = kmalloc(sizeof(*cs->inbuf), GFP_KERNEL); if (!cs->bcs || !cs->inbuf) { pr_err("out of memory\n"); goto error; -- 2.10.0