diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-28 12:55:16 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-23 15:20:57 +0300 |
commit | 2d3da59ff163b2aa805de0fc65ba933a735b00cd (patch) | |
tree | 4c370d1bf357c25d8941627ed8968ab295f1f8ee /drivers/media/dvb-frontends/cx24116.c | |
parent | d303b7c5b2660d93ba0dd2bf99b7dfa7bb93de73 (diff) | |
download | linux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.tar.xz |
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 <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'drivers/media/dvb-frontends/cx24116.c')
-rw-r--r-- | drivers/media/dvb-frontends/cx24116.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |