From 2d3da59ff163b2aa805de0fc65ba933a735b00cd Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Mon, 28 Aug 2017 05:55:16 -0400 Subject: media: drivers: improve a size determination 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. This issue was detected by using the Coccinelle software. [mchehab@s-opensoure.com: merge similar patches into one] Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil --- drivers/media/dvb-frontends/cx24116.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/dvb-frontends/cx24116.c') diff --git a/drivers/media/dvb-frontends/cx24116.c b/drivers/media/dvb-frontends/cx24116.c index e5135fbe0297..531c5861a27e 100644 --- a/drivers/media/dvb-frontends/cx24116.c +++ b/drivers/media/dvb-frontends/cx24116.c @@ -1126,7 +1126,7 @@ struct dvb_frontend *cx24116_attach(const struct cx24116_config *config, dprintk("%s\n", __func__); /* allocate memory for the internal state */ - state = kzalloc(sizeof(struct cx24116_state), GFP_KERNEL); + state = kzalloc(sizeof(*state), GFP_KERNEL); if (state == NULL) goto error1; -- cgit