aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/cx24113.c
diff options
context:
space:
mode:
authorGravatar Markus Elfring <elfring@users.sourceforge.net> 2017-08-28 05:55:16 -0400
committerGravatar Mauro Carvalho Chehab <mchehab@s-opensource.com> 2017-09-23 08:20:57 -0400
commit2d3da59ff163b2aa805de0fc65ba933a735b00cd (patch)
tree4c370d1bf357c25d8941627ed8968ab295f1f8ee /drivers/media/dvb-frontends/cx24113.c
parentmedia: drivers: delete unnecessary variable initialisations (diff)
downloadlinux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.tar.gz
linux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.tar.bz2
linux-2d3da59ff163b2aa805de0fc65ba933a735b00cd.zip
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/cx24113.c')
-rw-r--r--drivers/media/dvb-frontends/cx24113.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/cx24113.c b/drivers/media/dvb-frontends/cx24113.c
index 8fc7333c76b7..2c5502cab5e1 100644
--- a/drivers/media/dvb-frontends/cx24113.c
+++ b/drivers/media/dvb-frontends/cx24113.c
@@ -552,8 +552,7 @@ struct dvb_frontend *cx24113_attach(struct dvb_frontend *fe,
const struct cx24113_config *config, struct i2c_adapter *i2c)
{
/* allocate memory for the internal state */
- struct cx24113_state *state =
- kzalloc(sizeof(struct cx24113_state), GFP_KERNEL);
+ struct cx24113_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
int rc;
if (!state)